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

diff --git a/Objects/longobject.c b/Objects/longobject.c
index 102093e..afe30bc 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5286,7 +5286,7 @@
     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;
     }