diff options
author | Federico Di Gregorio <fog@initd.org> | 2005-11-24 03:21:37 +0000 |
---|---|---|
committer | Federico Di Gregorio <fog@initd.org> | 2005-11-24 03:21:37 +0000 |
commit | 81bc23a54e756a185cb3e8778db5ee3f9080e1df (patch) | |
tree | 8a9d87f3db9bac0e8b149a24f216252731902a88 | |
parent | a6be5bf7bc47357dc5ee52603356ab890f798b65 (diff) | |
download | psycopg2-81bc23a54e756a185cb3e8778db5ee3f9080e1df.tar.gz |
Fixed problem with type object dealloc.
-rw-r--r-- | psycopg/typecast.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/psycopg/typecast.c b/psycopg/typecast.c index d0a3d8a..1788563 100644 --- a/psycopg/typecast.c +++ b/psycopg/typecast.c @@ -367,7 +367,7 @@ typecast_dealloc(PyObject *obj) Py_XDECREF(self->name); Py_XDECREF(self->pcast); - obj->ob_type->tp_free(obj); + PyObject_Del(self); } static PyObject * @@ -452,6 +452,8 @@ typecast_new(PyObject *name, PyObject *values, PyObject *cast, PyObject *base) obj = PyObject_NEW(typecastObject, &typecastType); if (obj == NULL) return NULL; + Dprintf("typecast_new: new type at = %p, refcnt = %d", obj, obj->ob_refcnt); + Py_INCREF(values); obj->values = values; |