One more place where PyString_AsString() was used after a

PyString_Check() had already succeeded.
This commit is contained in:
Jeremy Hylton 2001-10-10 02:51:57 +00:00
parent a4c8cd7b2c
commit 0407aeae01
1 changed files with 1 additions and 1 deletions

View File

@ -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;