mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-16 03:50:43 +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");
|
||||
return NULL;
|
||||
}
|
||||
if (!(n = PyObject_Length(o))) goto error;
|
||||
if ((n = PyObject_Length(o)) == -1) goto error;
|
||||
if (!(r = PyTuple_New(n))) goto error;
|
||||
for (i=0; i<n; i++) {
|
||||
item = PySequence_GetItem(o, i);
|
||||
|
Reference in New Issue
Block a user