mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
devel/py-protobuf: Fix build with Clang 16
Reported by: fluffy, rhurlin, <jakub_lach@mailplus.pl> PR: 273282
This commit is contained in:
parent
521b9c768f
commit
ec97e4f373
1 changed files with 23 additions and 0 deletions
23
devel/py-protobuf/files/patch-clang16
Normal file
23
devel/py-protobuf/files/patch-clang16
Normal 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;
|
Loading…
Add table
Reference in a new issue