[Python-checkins] bpo-36027: Really fix "incompatible pointer type" compiler warning (GH-13761)

Petr Viktorin webhook-mailer at python.org
Sun Jun 2 20:28:33 EDT 2019


https://github.com/python/cpython/commit/1e375c6269e9de4f3d05d4aa6d6d74e00f522d63
commit: 1e375c6269e9de4f3d05d4aa6d6d74e00f522d63
branch: master
author: Petr Viktorin <encukou at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-06-03T02:28:29+02:00
summary:

bpo-36027: Really fix "incompatible pointer type" compiler warning (GH-13761)

Apologies for the earlier hasty attempt.

files:
M Objects/longobject.c

diff --git a/Objects/longobject.c b/Objects/longobject.c
index 858e256ac0b4..a1103f697c73 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -4243,7 +4243,7 @@ long_invmod(PyLongObject *a, PyLongObject *n)
 
     Py_DECREF(c);
     Py_DECREF(n);
-    if (long_compare(a, (PyObject *)_PyLong_One)) {
+    if (long_compare(a, (PyLongObject *)_PyLong_One)) {
         /* a != 1; we don't have an inverse. */
         Py_DECREF(a);
         Py_DECREF(b);



More information about the Python-checkins mailing list