summaryrefslogtreecommitdiffstats
path: root/Modules/_struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_struct.c')
-rw-r--r--Modules/_struct.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 796d168..1d7a935 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1650,7 +1650,7 @@ unpackiter_iternext(unpackiterobject *self)
}
static PyTypeObject unpackiter_type = {
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ PyVarObject_HEAD_INIT(NULL, 0)
"unpack_iterator", /* tp_name */
sizeof(unpackiterobject), /* tp_basicsize */
0, /* tp_itemsize */
@@ -2301,6 +2301,9 @@ PyInit__struct(void)
if (PyType_Ready(&PyStructType) < 0)
return NULL;
+ if (PyType_Ready(&unpackiter_type) < 0)
+ return NULL;
+
/* Check endian and swap in faster functions */
{
const formatdef *native = native_table;