summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-11-06 23:46:04 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-11-06 23:46:04 (GMT)
commitad14ccd047022d09f486d2359a342ffc5e676e5a (patch)
tree8ddf45c544c55f71d3aa1a877bd6b6d136d972f9 /Include/object.h
parent937114f7043d6a52172a34fe04febcc5ed0eaed9 (diff)
downloadcpython-ad14ccd047022d09f486d2359a342ffc5e676e5a.zip
cpython-ad14ccd047022d09f486d2359a342ffc5e676e5a.tar.gz
cpython-ad14ccd047022d09f486d2359a342ffc5e676e5a.tar.bz2
Issue #19512: add _PyUnicode_CompareWithId() function
_PyUnicode_CompareWithId() is faster than PyUnicode_CompareWithASCIIString() when both strings are equal and interned. Add also _PyId_builtins identifier for "builtins" common string.
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Include/object.h b/Include/object.h
index a36c5be..27f48a5 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -147,9 +147,10 @@ typedef struct _Py_Identifier {
#define _Py_static_string(varname, value) static _Py_Identifier varname = _Py_static_string_init(value)
#define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname)
-/* Common identifiers */
-PyAPI_DATA(_Py_Identifier) _PyId_path;
+/* Common identifiers (ex: _PyId_path is the string "path") */
PyAPI_DATA(_Py_Identifier) _PyId_argv;
+PyAPI_DATA(_Py_Identifier) _PyId_builtins;
+PyAPI_DATA(_Py_Identifier) _PyId_path;
PyAPI_DATA(_Py_Identifier) _PyId_stdin;
PyAPI_DATA(_Py_Identifier) _PyId_stdout;
PyAPI_DATA(_Py_Identifier) _PyId_stderr;