mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 21:00:33 +03:00
Use Py_CLEAR on self->query instead of if and decref
This commit is contained in:
parent
a210859326
commit
16021dae6d
|
@ -380,12 +380,7 @@ _psyco_curs_execute(cursorObject *self,
|
||||||
if (operation == NULL) { goto exit; }
|
if (operation == NULL) { goto exit; }
|
||||||
|
|
||||||
IFCLEARPGRES(self->pgres);
|
IFCLEARPGRES(self->pgres);
|
||||||
|
Py_CLEAR(self->query);
|
||||||
if (self->query) {
|
|
||||||
Py_DECREF(self->query);
|
|
||||||
self->query = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
Dprintf("psyco_curs_execute: starting execution of new query");
|
Dprintf("psyco_curs_execute: starting execution of new query");
|
||||||
|
|
||||||
/* here we are, and we have a sequence or a dictionary filled with
|
/* here we are, and we have a sequence or a dictionary filled with
|
||||||
|
|
Loading…
Reference in New Issue
Block a user