Added explicit cast for freefunc.

pull/13171/head
Joshua Haberman 3 years ago
parent b1426546fc
commit cf7dc19b72
  1. 2
      python/protobuf.h

@ -193,7 +193,7 @@ PyObject* PyUpb_Forbidden_New(PyObject* cls, PyObject* args, PyObject* kwds);
static inline void PyUpb_Dealloc(void* self) {
PyTypeObject* tp = Py_TYPE(self);
assert(PyType_GetFlags(tp) & Py_TPFLAGS_HEAPTYPE);
freefunc tp_free = PyType_GetSlot(tp, Py_tp_free);
freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
tp_free(self);
Py_DECREF(tp);
}

Loading…
Cancel
Save