-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong types for PyMemberDefs in Objects/typeobject.c #81132
Comments
In Objects/typeobject.c, the PyMemberDefs for __flags__, __weakrefoffset__, and __dictoffset__ all use T_LONG:
but in Include/object.h or Include/cpython/object.h, the corresponding struct members have types unsigned long, Py_ssize_t, and Py_ssize_t respectively: /* Flags to define presence of optional/expanded features */
unsigned long tp_flags;
...
/* weak reference enabler */
Py_ssize_t tp_weaklistoffset;
...
Py_ssize_t tp_dictoffset; These uses of T_LONG should be changed to T_ULONG and T_PYSSIZE_T. This was checked on 3.7.3 and master. |
Looks like I accidentally doubled the PyMemberDef for __weakrefoffset__ while editing. There's no double definition in the actual file. |
I agree that this should be fixed. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: