[Python-checkins] Fix compiler warning with a type cast (GH-9300)

Raymond Hettinger webhook-mailer at python.org
Fri Sep 14 04:36:06 EDT 2018


https://github.com/python/cpython/commit/73820a60cc3c990abb351540ca27bf7689bce8ac
commit: 73820a60cc3c990abb351540ca27bf7689bce8ac
branch: master
author: Raymond Hettinger <rhettinger at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-09-14T01:35:59-07:00
summary:

Fix compiler warning with a type cast (GH-9300)

files:
M Objects/longobject.c

diff --git a/Objects/longobject.c b/Objects/longobject.c
index 102093e19865..afe30bc0532a 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5286,7 +5286,7 @@ int_as_integer_ratio_impl(PyObject *self)
     if (PyLong_CheckExact(self)) {
         return PyTuple_Pack(2, self, _PyLong_One);
     }
-    numerator = _PyLong_Copy(self);
+    numerator = _PyLong_Copy((PyLongObject *) self);
     if (numerator == NULL) {
         return NULL;
     }



More information about the Python-checkins mailing list