Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0407aea

Browse files
committed
One more place where PyString_AsString() was used after a
PyString_Check() had already succeeded.
1 parent a4c8cd7 commit 0407aea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/getargs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf)
553553
case 'c': {/* char */
554554
char *p = va_arg(*p_va, char *);
555555
if (PyString_Check(arg) && PyString_Size(arg) == 1)
556-
*p = PyString_AsString(arg)[0];
556+
*p = PyString_AS_STRING(arg)[0];
557557
else
558558
return converterr("char", arg, msgbuf);
559559
break;

0 commit comments

Comments
 (0)