Mark state setting in _psyco_curs_execute()

This commit is contained in:
Daniele Varrazzo 2019-01-21 02:51:47 +00:00
parent d344ff818a
commit 18c34c2369

View File

@ -425,12 +425,12 @@ _psyco_curs_execute(cursorObject *self,
goto exit;
}
if (!(self->query = Bytes_FromFormat(
if (!(self->query = TO_STATE(Bytes_FromFormat(
"DECLARE %s %sCURSOR %s HOLD FOR %s",
self->qname,
scroll,
self->withhold ? "WITH" : "WITHOUT",
Bytes_AS_STRING(fquery)))) {
Bytes_AS_STRING(fquery))))) {
goto exit;
}
if (!self->query) { goto exit; }
@ -438,7 +438,7 @@ _psyco_curs_execute(cursorObject *self,
else {
/* Transfer ownership */
Py_INCREF(fquery);
self->query = fquery;
self->query = TO_STATE(fquery);
}
/* At this point, the SQL statement must be str, not unicode */