Skip to content

Commit e584cbf

Browse files
authored
bpo-36027 bpo-36974: Fix "incompatible pointer type" compiler warnings (GH-13758)
1 parent c6789d6 commit e584cbf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Modules/_testcapimodule.c

Lines changed: 1 addition & 1 deletion
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
}

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4243,7 +4243,7 @@ long_invmod(PyLongObject *a, PyLongObject *n)
42434243

42444244
Py_DECREF(c);
42454245
Py_DECREF(n);
4246-
if (long_compare(a, _PyLong_One)) {
4246+
if (long_compare(a, (PyObject *)_PyLong_One)) {
42474247
/* a != 1; we don't have an inverse. */
42484248
Py_DECREF(a);
42494249
Py_DECREF(b);

0 commit comments

Comments
 (0)