bpo-36027 bpo-36974: Fix "incompatible pointer type" compiler warning… · python/cpython@e584cbf

Original file line numberDiff line numberDiff line change

@@ -5854,7 +5854,7 @@ MethodDescriptor_vectorcall(PyObject *callable, PyObject *const *args,

58545854

static PyObject *

58555855

MethodDescriptor_new(PyTypeObject* type, PyObject* args, PyObject *kw)

58565856

{

5857-

MethodDescriptorObject *op = type->tp_alloc(type, 0);

5857+

MethodDescriptorObject *op = (MethodDescriptorObject *)type->tp_alloc(type, 0);

58585858

op->vectorcall = MethodDescriptor_vectorcall;

58595859

return (PyObject *)op;

58605860

}