[Python-checkins] r46586 - python/trunk/Objects/complexobject.c
georg.brandl
python-checkins at python.org
Thu Jun 1 10:27:33 CEST 2006
Author: georg.brandl
Date: Thu Jun 1 10:27:32 2006
New Revision: 46586
Modified:
python/trunk/Objects/complexobject.c
Log:
Correctly allocate complex types with tp_alloc. (bug #1498638)
Modified: python/trunk/Objects/complexobject.c
==============================================================================
--- python/trunk/Objects/complexobject.c (original)
+++ python/trunk/Objects/complexobject.c Thu Jun 1 10:27:32 2006
@@ -188,7 +188,7 @@
{
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 @@
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 */
};
More information about the Python-checkins
mailing list