mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +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
|
||||
error_traverse(errorObject *self, visitproc visit, void *arg)
|
||||
{
|
||||
Py_VISIT(self->pgerror);
|
||||
Py_VISIT(self->pgcode);
|
||||
Py_VISIT(self->cursor);
|
||||
return ((PyTypeObject *)PyExc_StandardError)->tp_traverse(
|
||||
(PyObject *)self, visit, arg);
|
||||
|
@ -101,8 +103,10 @@ error_clear(errorObject *self)
|
|||
Py_CLEAR(self->pgerror);
|
||||
Py_CLEAR(self->pgcode);
|
||||
Py_CLEAR(self->cursor);
|
||||
|
||||
PyMem_Free(self->codec);
|
||||
CLEARPGRES(self->pgres);
|
||||
|
||||
return ((PyTypeObject *)PyExc_StandardError)->tp_clear((PyObject *)self);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user