Use AS_STRING() following the check and avoid an extra call.

This commit is contained in:
Jeremy Hylton 2001-10-10 02:51:08 +00:00
parent 7d3dff2b39
commit a4c8cd7b2c

View File

@ -647,7 +647,7 @@ convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf)
if (arg == Py_None)
*p = 0;
else if (PyString_Check(arg))
*p = PyString_AsString(arg);
*p = PyString_AS_STRING(arg);
#ifdef Py_USING_UNICODE
else if (PyUnicode_Check(arg)) {
uarg = UNICODE_DEFAULT_ENCODING(arg);