summaryrefslogtreecommitdiffstats
path: root/Include/unicodeobject.h
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-07-04 23:04:44 (GMT)
committerRaymond Hettinger <python@rcn.com>2015-07-04 23:04:44 (GMT)
commitac2ef65c320606e30132ca58bbd6b5d6861ce644 (patch)
tree60314adce386a879a44b69e752d29568d63d894d /Include/unicodeobject.h
parent7fe0507d07f819c76a79421ae54d547a54e6f35d (diff)
downloadcpython-ac2ef65c320606e30132ca58bbd6b5d6861ce644.zip
cpython-ac2ef65c320606e30132ca58bbd6b5d6861ce644.tar.gz
cpython-ac2ef65c320606e30132ca58bbd6b5d6861ce644.tar.bz2
Make the unicode equality test an external function rather than in-lining it.
The real benefit of the unicode specialized function comes from bypassing the overhead of PyObject_RichCompareBool() and not from being in-lined (especially since there was almost no shared data between the caller and callee). Also, the in-lining was having a negative effect on code generation for the callee.
Diffstat (limited to 'Include/unicodeobject.h')
-rw-r--r--Include/unicodeobject.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 4ba6328..33e8f19 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -2261,6 +2261,10 @@ PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*);
/* Clear all static strings. */
PyAPI_FUNC(void) _PyUnicode_ClearStaticStrings(void);
+/* Fast equality check when the inputs are known to be exact unicode types
+ and where the hash values are equal (i.e. a very probable match) */
+PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *);
+
#ifdef __cplusplus
}
#endif