mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-16 12:27:03 +08:00
PyObject_Length() == -1 on error. Thanks, Jon Ribbens.
This commit is contained in:
@ -522,7 +522,7 @@ _mysql_escape_sequence(
|
|||||||
"argument 2 must be a mapping");
|
"argument 2 must be a mapping");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!(n = PyObject_Length(o))) goto error;
|
if ((n = PyObject_Length(o)) == -1) goto error;
|
||||||
if (!(r = PyTuple_New(n))) goto error;
|
if (!(r = PyTuple_New(n))) goto error;
|
||||||
for (i=0; i<n; i++) {
|
for (i=0; i<n; i++) {
|
||||||
item = PySequence_GetItem(o, i);
|
item = PySequence_GetItem(o, i);
|
||||||
|
Reference in New Issue
Block a user