mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 10:53:44 +03:00
Fixed problem with type object dealloc.
This commit is contained in:
parent
a6be5bf7bc
commit
81bc23a54e
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user