]> granicus.if.org Git - python/commitdiff
Fix compiler warning with a type cast (GH-9300)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Fri, 14 Sep 2018 08:35:59 +0000 (01:35 -0700)
committerGitHub <noreply@github.com>
Fri, 14 Sep 2018 08:35:59 +0000 (01:35 -0700)
Objects/longobject.c

index 102093e1986547baa1f4ba3e5de0a0a0fc6596a3..afe30bc0532a786090c9ffd3bb27ab596311e11d 100644 (file)
@@ -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;
     }