mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 10:53:44 +03:00
Added forgotten attributes to visit in error
This commit is contained in:
parent
75811f5bb1
commit
9813bac4fe
|
@ -90,6 +90,8 @@ error_init(errorObject *self, PyObject *args, PyObject *kwargs)
|
||||||
static int
|
static int
|
||||||
error_traverse(errorObject *self, visitproc visit, void *arg)
|
error_traverse(errorObject *self, visitproc visit, void *arg)
|
||||||
{
|
{
|
||||||
|
Py_VISIT(self->pgerror);
|
||||||
|
Py_VISIT(self->pgcode);
|
||||||
Py_VISIT(self->cursor);
|
Py_VISIT(self->cursor);
|
||||||
return ((PyTypeObject *)PyExc_StandardError)->tp_traverse(
|
return ((PyTypeObject *)PyExc_StandardError)->tp_traverse(
|
||||||
(PyObject *)self, visit, arg);
|
(PyObject *)self, visit, arg);
|
||||||
|
@ -101,8 +103,10 @@ error_clear(errorObject *self)
|
||||||
Py_CLEAR(self->pgerror);
|
Py_CLEAR(self->pgerror);
|
||||||
Py_CLEAR(self->pgcode);
|
Py_CLEAR(self->pgcode);
|
||||||
Py_CLEAR(self->cursor);
|
Py_CLEAR(self->cursor);
|
||||||
|
|
||||||
PyMem_Free(self->codec);
|
PyMem_Free(self->codec);
|
||||||
CLEARPGRES(self->pgres);
|
CLEARPGRES(self->pgres);
|
||||||
|
|
||||||
return ((PyTypeObject *)PyExc_StandardError)->tp_clear((PyObject *)self);
|
return ((PyTypeObject *)PyExc_StandardError)->tp_clear((PyObject *)self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user