bpo-36027 bpo-36974: Fix "incompatible pointer type" compiler warnings (GH-13758)

This commit is contained in:
Petr Viktorin 2019-06-03 01:08:14 +02:00 committed by GitHub
parent c6789d6c85
commit e584cbff1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -5854,7 +5854,7 @@ MethodDescriptor_vectorcall(PyObject *callable, PyObject *const *args,
static PyObject * static PyObject *
MethodDescriptor_new(PyTypeObject* type, PyObject* args, PyObject *kw) MethodDescriptor_new(PyTypeObject* type, PyObject* args, PyObject *kw)
{ {
MethodDescriptorObject *op = type->tp_alloc(type, 0); MethodDescriptorObject *op = (MethodDescriptorObject *)type->tp_alloc(type, 0);
op->vectorcall = MethodDescriptor_vectorcall; op->vectorcall = MethodDescriptor_vectorcall;
return (PyObject *)op; return (PyObject *)op;
} }

View file

@ -4243,7 +4243,7 @@ long_invmod(PyLongObject *a, PyLongObject *n)
Py_DECREF(c); Py_DECREF(c);
Py_DECREF(n); Py_DECREF(n);
if (long_compare(a, _PyLong_One)) { if (long_compare(a, (PyObject *)_PyLong_One)) {
/* a != 1; we don't have an inverse. */ /* a != 1; we don't have an inverse. */
Py_DECREF(a); Py_DECREF(a);
Py_DECREF(b); Py_DECREF(b);