Skip to content

Commit b7eba00

Browse files
committed
Fix tp_basicsize and tp_itemsize for bool
1 parent f46ba55 commit b7eba00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/boolobject.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ bool_dealloc(PyObject* Py_UNUSED(ignore))
153153
PyTypeObject PyBool_Type = {
154154
PyVarObject_HEAD_INIT(&PyType_Type, 0)
155155
"bool",
156-
sizeof(struct _longobject),
157-
0,
156+
offsetof(struct _longobject, ob_digit), /* tp_basicsize */
157+
sizeof(digit), /* tp_itemsize */
158158
bool_dealloc, /* tp_dealloc */
159159
0, /* tp_vectorcall_offset */
160160
0, /* tp_getattr */

0 commit comments

Comments
 (0)