Kaydet (Commit) 0407aeae authored tarafından Jeremy Hylton's avatar Jeremy Hylton

One more place where PyString_AsString() was used after a

PyString_Check() had already succeeded.
üst a4c8cd7b
......@@ -553,7 +553,7 @@ convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf)
case 'c': {/* char */
char *p = va_arg(*p_va, char *);
if (PyString_Check(arg) && PyString_Size(arg) == 1)
*p = PyString_AsString(arg)[0];
*p = PyString_AS_STRING(arg)[0];
else
return converterr("char", arg, msgbuf);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment