From: Jeremy Hylton Date: Wed, 10 Oct 2001 02:51:08 +0000 (+0000) Subject: Use AS_STRING() following the check and avoid an extra call. X-Git-Tag: v2.2.1c1~1358 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4c8cd7b2c07891a7b913435a0ce59ece502cfb9;p=thirdparty%2FPython%2Fcpython.git Use AS_STRING() following the check and avoid an extra call. --- diff --git a/Python/getargs.c b/Python/getargs.c index 16373d9b756c..ad80b3f08ab0 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -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);