Fix forward for Python bytearray.
We need to use the stable functions instead of the unsafe macros, as the latter are not part of the stable ABI.
PiperOrigin-RevId: 642679733
diff --git a/python/message.c b/python/message.c
index 327eb2e..8e418f0 100644
--- a/python/message.c
+++ b/python/message.c
@@ -1330,8 +1330,8 @@
(void)err;
assert(err >= 0);
} else if (PyByteArray_Check(arg)) {
- buf = PyByteArray_AS_STRING(arg);
- size = PyByteArray_GET_SIZE(arg);
+ buf = PyByteArray_AsString(arg);
+ size = PyByteArray_Size(arg);
} else if (PyBytes_AsStringAndSize(arg, &buf, &size) < 0) {
return NULL;
}