]> granicus.if.org Git - python/commitdiff
closes bpo-36951: Correct some types in the type_members struct in typeobject.c....
authorZackery Spytz <zspytz@gmail.com>
Mon, 20 May 2019 00:26:35 +0000 (18:26 -0600)
committerBenjamin Peterson <benjamin@python.org>
Mon, 20 May 2019 00:26:35 +0000 (17:26 -0700)
Objects/typeobject.c

index bfbd320b1f54d8f827aeb4ef7880a724c4cd3bba..c086f182aa958a21f4e25b90f799b1dc0e68c13b 100644 (file)
@@ -369,11 +369,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}