[Python-checkins] cpython (3.5): gc types needs to be allocated as such (closes #29398)

benjamin.peterson python-checkins at python.org
Wed Feb 1 02:31:29 EST 2017


https://hg.python.org/cpython/rev/167beb21b527
changeset:   106356:167beb21b527
branch:      3.5
parent:      106351:c8c1f08428cb
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Jan 31 23:31:02 2017 -0800
summary:
  gc types needs to be allocated as such (closes #29398)

files:
  Modules/xxlimited.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/xxlimited.c b/Modules/xxlimited.c
--- a/Modules/xxlimited.c
+++ b/Modules/xxlimited.c
@@ -31,7 +31,7 @@
 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;

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list