summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-10 15:50:56 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-10 15:50:56 (GMT)
commit0ded5b54bb499865fb4ab8c0ac3d0977df9a334d (patch)
treea395f726d50a71b1bf363d5a041224ad51e80691 /Objects/stringobject.c
parent110194048e2d6a42f5954c39c8646ba93b66a7e1 (diff)
downloadcpython-0ded5b54bb499865fb4ab8c0ac3d0977df9a334d.zip
cpython-0ded5b54bb499865fb4ab8c0ac3d0977df9a334d.tar.gz
cpython-0ded5b54bb499865fb4ab8c0ac3d0977df9a334d.tar.bz2
Fixed issue #1564: The set implementation should special-case PyUnicode instead of PyString
I moved the unicode_eq to stringlib/eq.h to keep the function static and possible inline for setobject.c and dictobject.h. I also removed the unused _PyString_Eq method. If it's required in the future it can be added to eq.h
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 855f6cd..619804b 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -877,16 +877,6 @@ string_richcompare(PyStringObject *a, PyStringObject *b, int op)
return result;
}
-int
-_PyString_Eq(PyObject *o1, PyObject *o2)
-{
- PyStringObject *a = (PyStringObject*) o1;
- PyStringObject *b = (PyStringObject*) o2;
- return Py_Size(a) == Py_Size(b)
- && *a->ob_sval == *b->ob_sval
- && memcmp(a->ob_sval, b->ob_sval, Py_Size(a)) == 0;
-}
-
static long
string_hash(PyStringObject *a)
{