diff options
author | Georg Brandl <georg@python.org> | 2006-06-01 08:27:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-06-01 08:27:32 (GMT) |
commit | 6b50c63a23227d542b094432525d2f857be648ef (patch) | |
tree | c9e661669d723b4773b60f18123f4e7d8a21eaca /Objects | |
parent | 85ac8508346db10592afde6c9ded8785942f60b7 (diff) | |
download | cpython-6b50c63a23227d542b094432525d2f857be648ef.zip cpython-6b50c63a23227d542b094432525d2f857be648ef.tar.gz cpython-6b50c63a23227d542b094432525d2f857be648ef.tar.bz2 |
Correctly allocate complex types with tp_alloc. (bug #1498638)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/complexobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 17aef8f..4c6ea39 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -188,7 +188,7 @@ complex_subtype_from_c_complex(PyTypeObject *type, Py_complex cval) { PyObject *op; - op = PyType_GenericAlloc(type, 0); + op = type->tp_alloc(type, 0); if (op != NULL) ((PyComplexObject *)op)->cval = cval; return op; @@ -1023,7 +1023,7 @@ PyTypeObject PyComplex_Type = { 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ - 0, /* tp_alloc */ + PyType_GenericAlloc, /* tp_alloc */ complex_new, /* tp_new */ PyObject_Del, /* tp_free */ }; |