1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-07-08 12:59:17 -04:00
ports/devel/py-protobuf/files/patch-clang16
Po-Chuan Hsieh ec97e4f373
devel/py-protobuf: Fix build with Clang 16
Reported by:	fluffy, rhurlin, <jakub_lach@mailplus.pl>
PR:		273282
2023-08-26 17:27:33 +08:00

23 lines
1,019 B
Text

--- 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;