Fixed problem with type object dealloc.

This commit is contained in:
Federico Di Gregorio 2005-11-24 03:21:37 +00:00
parent a6be5bf7bc
commit 81bc23a54e

View File

@ -367,7 +367,7 @@ typecast_dealloc(PyObject *obj)
Py_XDECREF(self->name); Py_XDECREF(self->name);
Py_XDECREF(self->pcast); Py_XDECREF(self->pcast);
obj->ob_type->tp_free(obj); PyObject_Del(self);
} }
static PyObject * static PyObject *
@ -452,6 +452,8 @@ typecast_new(PyObject *name, PyObject *values, PyObject *cast, PyObject *base)
obj = PyObject_NEW(typecastObject, &typecastType); obj = PyObject_NEW(typecastObject, &typecastType);
if (obj == NULL) return NULL; if (obj == NULL) return NULL;
Dprintf("typecast_new: new type at = %p, refcnt = %d", obj, obj->ob_refcnt);
Py_INCREF(values); Py_INCREF(values);
obj->values = values; obj->values = values;