mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
* psycopg/adapter_qstring.c (qstring_traverse): add cyclic GC
traversal for quoted string adapters. * psycopg/adapter_pboolean.c (pboolean_traverse): add cyclic GC traversal for boolean adapters. * psycopg/adapter_mxdatetime.c (mxdatetime_traverse): add cyclic GC traversal for mxdatetime adapters. * psycopg/adapter_datetime.c (pydatetime_traverse): add cyclic GC traversal for datetime adapters.
This commit is contained in:
parent
590542e973
commit
e0287c0db4
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2008-07-18 James Henstridge <james@jamesh.id.au>
|
||||||
|
|
||||||
|
* psycopg/adapter_qstring.c (qstring_traverse): add cyclic GC
|
||||||
|
traversal for quoted string adapters.
|
||||||
|
|
||||||
|
* psycopg/adapter_pboolean.c (pboolean_traverse): add cyclic GC
|
||||||
|
traversal for boolean adapters.
|
||||||
|
|
||||||
|
* psycopg/adapter_mxdatetime.c (mxdatetime_traverse): add cyclic
|
||||||
|
GC traversal for mxdatetime adapters.
|
||||||
|
|
||||||
|
* psycopg/adapter_datetime.c (pydatetime_traverse): add cyclic GC
|
||||||
|
traversal for datetime adapters.
|
||||||
|
|
||||||
2008-07-01 James Henstridge <james@jamesh.id.au>
|
2008-07-01 James Henstridge <james@jamesh.id.au>
|
||||||
|
|
||||||
* psycopg/adapter_binary.c (binary_traverse): add cyclic GC
|
* psycopg/adapter_binary.c (binary_traverse): add cyclic GC
|
||||||
|
|
|
@ -140,6 +140,15 @@ pydatetime_setup(pydatetimeObject *self, PyObject *obj, int type)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
pydatetime_traverse(PyObject *obj, visitproc visit, void *arg)
|
||||||
|
{
|
||||||
|
pydatetimeObject *self = (pydatetimeObject *)obj;
|
||||||
|
|
||||||
|
Py_VISIT(self->wrapped);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pydatetime_dealloc(PyObject* obj)
|
pydatetime_dealloc(PyObject* obj)
|
||||||
{
|
{
|
||||||
|
@ -174,7 +183,7 @@ pydatetime_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
static void
|
static void
|
||||||
pydatetime_del(PyObject* self)
|
pydatetime_del(PyObject* self)
|
||||||
{
|
{
|
||||||
PyObject_Del(self);
|
PyObject_GC_Del(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -213,11 +222,11 @@ PyTypeObject pydatetimeType = {
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
|
|
||||||
pydatetimeType_doc, /*tp_doc*/
|
pydatetimeType_doc, /*tp_doc*/
|
||||||
|
|
||||||
0, /*tp_traverse*/
|
pydatetime_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
|
|
|
@ -162,6 +162,15 @@ mxdatetime_setup(mxdatetimeObject *self, PyObject *obj, int type)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
mxdatetime_traverse(PyObject *obj, visitproc visit, void *arg)
|
||||||
|
{
|
||||||
|
mxdatetimeObject *self = (mxdatetimeObject *)obj;
|
||||||
|
|
||||||
|
Py_VISIT(self->wrapped);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mxdatetime_dealloc(PyObject* obj)
|
mxdatetime_dealloc(PyObject* obj)
|
||||||
{
|
{
|
||||||
|
@ -198,7 +207,7 @@ mxdatetime_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
static void
|
static void
|
||||||
mxdatetime_del(PyObject* self)
|
mxdatetime_del(PyObject* self)
|
||||||
{
|
{
|
||||||
PyObject_Del(self);
|
PyObject_GC_Del(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -237,11 +246,11 @@ PyTypeObject mxdatetimeType = {
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
|
|
||||||
mxdatetimeType_doc, /*tp_doc*/
|
mxdatetimeType_doc, /*tp_doc*/
|
||||||
|
|
||||||
0, /*tp_traverse*/
|
mxdatetime_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
|
|
|
@ -116,6 +116,15 @@ pboolean_setup(pbooleanObject *self, PyObject *obj)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
pboolean_traverse(PyObject *obj, visitproc visit, void *arg)
|
||||||
|
{
|
||||||
|
pbooleanObject *self = (pbooleanObject *)obj;
|
||||||
|
|
||||||
|
Py_VISIT(self->wrapped);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pboolean_dealloc(PyObject* obj)
|
pboolean_dealloc(PyObject* obj)
|
||||||
{
|
{
|
||||||
|
@ -151,7 +160,7 @@ pboolean_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
static void
|
static void
|
||||||
pboolean_del(PyObject* self)
|
pboolean_del(PyObject* self)
|
||||||
{
|
{
|
||||||
PyObject_Del(self);
|
PyObject_GC_Del(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -194,10 +203,10 @@ PyTypeObject pbooleanType = {
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
pbooleanType_doc, /*tp_doc*/
|
pbooleanType_doc, /*tp_doc*/
|
||||||
|
|
||||||
0, /*tp_traverse*/
|
pboolean_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
|
|
|
@ -290,6 +290,17 @@ qstring_setup(qstringObject *self, PyObject *str, const char *enc)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
qstring_traverse(PyObject *obj, visitproc visit, void *arg)
|
||||||
|
{
|
||||||
|
qstringObject *self = (qstringObject *)obj;
|
||||||
|
|
||||||
|
Py_VISIT(self->wrapped);
|
||||||
|
Py_VISIT(self->buffer);
|
||||||
|
Py_VISIT(self->conn);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qstring_dealloc(PyObject* obj)
|
qstring_dealloc(PyObject* obj)
|
||||||
{
|
{
|
||||||
|
@ -330,7 +341,7 @@ qstring_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
static void
|
static void
|
||||||
qstring_del(PyObject* self)
|
qstring_del(PyObject* self)
|
||||||
{
|
{
|
||||||
PyObject_Del(self);
|
PyObject_GC_Del(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -369,11 +380,11 @@ PyTypeObject qstringType = {
|
||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
|
|
||||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
|
|
||||||
qstringType_doc, /*tp_doc*/
|
qstringType_doc, /*tp_doc*/
|
||||||
|
|
||||||
0, /*tp_traverse*/
|
qstring_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
|
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user