Use Py_CLEAR on self->query instead of if and decref

This commit is contained in:
Daniele Varrazzo 2013-03-20 00:44:15 +00:00
parent a210859326
commit 16021dae6d

View File

@ -380,12 +380,7 @@ _psyco_curs_execute(cursorObject *self,
if (operation == NULL) { goto exit; }
IFCLEARPGRES(self->pgres);
if (self->query) {
Py_DECREF(self->query);
self->query = NULL;
}
Py_CLEAR(self->query);
Dprintf("psyco_curs_execute: starting execution of new query");
/* here we are, and we have a sequence or a dictionary filled with