diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-06 23:46:04 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-06 23:46:04 (GMT) |
| commit | ad14ccd047022d09f486d2359a342ffc5e676e5a (patch) | |
| tree | 8ddf45c544c55f71d3aa1a877bd6b6d136d972f9 /Include/unicodeobject.h | |
| parent | 937114f7043d6a52172a34fe04febcc5ed0eaed9 (diff) | |
| download | cpython-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/unicodeobject.h')
| -rw-r--r-- | Include/unicodeobject.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 6d830c0..20ce41d 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -1996,6 +1996,11 @@ PyAPI_FUNC(int) PyUnicode_Compare( PyObject *right /* Right string */ ); +PyAPI_FUNC(int) _PyUnicode_CompareWithId( + PyObject *left, /* Left string */ + _Py_Identifier *right /* Right identifier */ + ); + PyAPI_FUNC(int) PyUnicode_CompareWithASCIIString( PyObject *left, const char *right /* ASCII-encoded string */ |
