devel/py-protobuf: Fix build with Clang 16

Reported by:	fluffy, rhurlin, <jakub_lach@mailplus.pl>
PR:		273282
This commit is contained in:
Po-Chuan Hsieh 2023-08-26 17:27:33 +08:00
parent 521b9c768f
commit ec97e4f373
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B

View file

@ -0,0 +1,23 @@
--- python/message.c.orig 2000-01-01 00:00:00 UTC
+++ python/message.c
@@ -1235,7 +1235,7 @@ static PyObject* PyUpb_Message_CopyFrom(PyObject* _sel
Py_DECREF(tmp);
upb_Message_DeepCopy(self->ptr.msg, other->ptr.msg,
- upb_MessageDef_MiniTable(other->def),
+ upb_MessageDef_MiniTable((upb_MessageDef *) other->def),
PyUpb_Arena_Get(self->arena));
PyUpb_Message_SyncSubobjs(self);
@@ -1606,9 +1606,9 @@ PyObject* DeepCopy(PyObject* _self, PyObject* arg) {
PyObject* arena = PyUpb_Arena_New();
upb_Message* clone =
- upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable(self->def),
+ upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable((upb_MessageDef *) self->def),
PyUpb_Arena_Get(arena));
- PyObject* ret = PyUpb_Message_Get(clone, self->def, arena);
+ PyObject* ret = PyUpb_Message_Get(clone, (upb_MessageDef *) self->def, arena);
Py_DECREF(arena);
return ret;