Issue36951
Created on 2019-05-17 19:50 by Kevin Shweh, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 13403 | merged | ZackerySpytz, 2019-05-18 06:57 | |
| PR 13433 | merged | miss-islington, 2019-05-20 00:26 | |
| PR 13434 | merged | miss-islington, 2019-05-20 00:26 | |
| Messages (6) | |||
|---|---|---|---|
| msg342759 - (view) | Author: Kevin Shweh (Kevin Shweh) | Date: 2019-05-17 19:50 | |
In Objects/typeobject.c, the PyMemberDefs for __flags__, __weakrefoffset__, and __dictoffset__ all use T_LONG: {"__flags__", T_LONG, offsetof(PyTypeObject, tp_flags), READONLY}, {"__weakrefoffset__", T_LONG, offsetof(PyTypeObject, tp_weaklistoffset), READONLY}, ... {"__dictoffset__", T_LONG, offsetof(PyTypeObject, tp_dictoffset), READONLY}, {"__weakrefoffset__", T_LONG, offsetof(PyTypeObject, tp_weaklistoffset), READONLY}, 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. |
|||
| msg342760 - (view) | Author: Kevin Shweh (Kevin Shweh) | Date: 2019-05-17 19:54 | |
Looks like I accidentally doubled the PyMemberDef for __weakrefoffset__ while editing. There's no double definition in the actual file. |
|||
| msg342788 - (view) | Author: Zackery Spytz (ZackerySpytz) * ![]() |
Date: 2019-05-18 07:02 | |
I agree that this should be fixed. |
|||
| msg342882 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2019-05-20 00:26 | |
New changeset 53d378c81286644138415cb56da52a7351e1a477 by Benjamin Peterson (Zackery Spytz) in branch 'master': closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403) https://github.com/python/cpython/commit/53d378c81286644138415cb56da52a7351e1a477 |
|||
| msg342883 - (view) | Author: miss-islington (miss-islington) | Date: 2019-05-20 00:49 | |
New changeset eda691dd9d076e175c396dc6f85dee2795572f6c by Miss Islington (bot) in branch '2.7': closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403) https://github.com/python/cpython/commit/eda691dd9d076e175c396dc6f85dee2795572f6c |
|||
| msg342884 - (view) | Author: miss-islington (miss-islington) | Date: 2019-05-20 00:54 | |
New changeset 64b0bdba7ee30ecc5c4c5ad46fb6afd6c0ddd487 by Miss Islington (bot) in branch '3.7': closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403) https://github.com/python/cpython/commit/64b0bdba7ee30ecc5c4c5ad46fb6afd6c0ddd487 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:15 | admin | set | github: 81132 |
| 2019-05-20 00:54:12 | miss-islington | set | messages: + msg342884 |
| 2019-05-20 00:49:55 | miss-islington | set | nosy:
+ miss-islington messages: + msg342883 |
| 2019-05-20 00:26:56 | miss-islington | set | pull_requests: + pull_request13344 |
| 2019-05-20 00:26:46 | miss-islington | set | pull_requests: + pull_request13343 |
| 2019-05-20 00:26:38 | benjamin.peterson | set | status: open -> closed nosy:
+ benjamin.peterson resolution: fixed |
| 2019-05-18 07:02:01 | ZackerySpytz | set | nosy:
+ ZackerySpytz messages:
+ msg342788 |
| 2019-05-18 06:57:37 | ZackerySpytz | set | keywords:
+ patch stage: patch review pull_requests: + pull_request13315 |
| 2019-05-17 19:54:47 | Kevin Shweh | set | messages: + msg342760 |
| 2019-05-17 19:50:54 | Kevin Shweh | create | |

