summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-10-10 02:51:08 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-10-10 02:51:08 (GMT)
commita4c8cd7b2c07891a7b913435a0ce59ece502cfb9 (patch)
tree09cde07f2c29c02242d8e7cf6474198660053f2a
parent7d3dff2b390272dec07ca687f53ad34bd00df39b (diff)
downloadcpython-a4c8cd7b2c07891a7b913435a0ce59ece502cfb9.zip
cpython-a4c8cd7b2c07891a7b913435a0ce59ece502cfb9.tar.gz
cpython-a4c8cd7b2c07891a7b913435a0ce59ece502cfb9.tar.bz2
Use AS_STRING() following the check and avoid an extra call.
-rw-r--r--Python/getargs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index 16373d9..ad80b3f 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);