mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Use AS_STRING() following the check and avoid an extra call.
This commit is contained in:
parent
7d3dff2b39
commit
a4c8cd7b2c
1 changed files with 1 additions and 1 deletions
|
@ -647,7 +647,7 @@ convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf)
|
||||||
if (arg == Py_None)
|
if (arg == Py_None)
|
||||||
*p = 0;
|
*p = 0;
|
||||||
else if (PyString_Check(arg))
|
else if (PyString_Check(arg))
|
||||||
*p = PyString_AsString(arg);
|
*p = PyString_AS_STRING(arg);
|
||||||
#ifdef Py_USING_UNICODE
|
#ifdef Py_USING_UNICODE
|
||||||
else if (PyUnicode_Check(arg)) {
|
else if (PyUnicode_Check(arg)) {
|
||||||
uarg = UNICODE_DEFAULT_ENCODING(arg);
|
uarg = UNICODE_DEFAULT_ENCODING(arg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue