]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-36951: Correct some types in the type_members struct in typeobject.c....
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 20 May 2019 00:54:08 +0000 (17:54 -0700)
committerGitHub <noreply@github.com>
Mon, 20 May 2019 00:54:08 +0000 (17:54 -0700)
(cherry picked from commit 53d378c81286644138415cb56da52a7351e1a477)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Objects/typeobject.c

index c578d6e9354568ca591d90394dd956475f31665a..8adae49a7f27e508bd2cf987bc6cc9331c16ee1f 100644 (file)
@@ -363,11 +363,11 @@ assign_version_tag(PyTypeObject *type)
 static PyMemberDef type_members[] = {
     {"__basicsize__", T_PYSSIZET, offsetof(PyTypeObject,tp_basicsize),READONLY},
     {"__itemsize__", T_PYSSIZET, offsetof(PyTypeObject, tp_itemsize), READONLY},
-    {"__flags__", T_LONG, offsetof(PyTypeObject, tp_flags), READONLY},
-    {"__weakrefoffset__", T_LONG,
+    {"__flags__", T_ULONG, offsetof(PyTypeObject, tp_flags), READONLY},
+    {"__weakrefoffset__", T_PYSSIZET,
      offsetof(PyTypeObject, tp_weaklistoffset), READONLY},
     {"__base__", T_OBJECT, offsetof(PyTypeObject, tp_base), READONLY},
-    {"__dictoffset__", T_LONG,
+    {"__dictoffset__", T_PYSSIZET,
      offsetof(PyTypeObject, tp_dictoffset), READONLY},
     {"__mro__", T_OBJECT, offsetof(PyTypeObject, tp_mro), READONLY},
     {0}