mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-28 20:03:43 +03:00
Mark state setting in _psyco_curs_execute()
This commit is contained in:
parent
d344ff818a
commit
18c34c2369
|
@ -425,12 +425,12 @@ _psyco_curs_execute(cursorObject *self,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(self->query = Bytes_FromFormat(
|
if (!(self->query = TO_STATE(Bytes_FromFormat(
|
||||||
"DECLARE %s %sCURSOR %s HOLD FOR %s",
|
"DECLARE %s %sCURSOR %s HOLD FOR %s",
|
||||||
self->qname,
|
self->qname,
|
||||||
scroll,
|
scroll,
|
||||||
self->withhold ? "WITH" : "WITHOUT",
|
self->withhold ? "WITH" : "WITHOUT",
|
||||||
Bytes_AS_STRING(fquery)))) {
|
Bytes_AS_STRING(fquery))))) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!self->query) { goto exit; }
|
if (!self->query) { goto exit; }
|
||||||
|
@ -438,7 +438,7 @@ _psyco_curs_execute(cursorObject *self,
|
||||||
else {
|
else {
|
||||||
/* Transfer ownership */
|
/* Transfer ownership */
|
||||||
Py_INCREF(fquery);
|
Py_INCREF(fquery);
|
||||||
self->query = fquery;
|
self->query = TO_STATE(fquery);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* At this point, the SQL statement must be str, not unicode */
|
/* At this point, the SQL statement must be str, not unicode */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user