]> granicus.if.org Git - python/commitdiff
gc types needs to be allocated as such (closes #29398)
authorBenjamin Peterson <benjamin@python.org>
Wed, 1 Feb 2017 07:31:02 +0000 (23:31 -0800)
committerBenjamin Peterson <benjamin@python.org>
Wed, 1 Feb 2017 07:31:02 +0000 (23:31 -0800)
Modules/xxlimited.c

index 40c176063dbac4ea393ab2ba66b5aeb6eec20f47..ea620fdf2e8183d2b31722438f8b77ca210a700d 100644 (file)
@@ -31,7 +31,7 @@ static XxoObject *
 newXxoObject(PyObject *arg)
 {
     XxoObject *self;
-    self = PyObject_New(XxoObject, (PyTypeObject*)Xxo_Type);
+    self = PyObject_GC_New(XxoObject, (PyTypeObject*)Xxo_Type);
     if (self == NULL)
         return NULL;
     self->x_attr = NULL;