needforspeed: stringlib refactoring, continued. added count and

find helpers; updated unicodeobject to use stringlib_count
This commit is contained in:
Fredrik Lundh 2006-05-26 19:24:53 +00:00
parent a26de2a80f
commit 58b5e84d52
5 changed files with 136 additions and 57 deletions

View file

@ -1548,7 +1548,7 @@ string_partition(PyStringObject *self, PyObject *sep_obj)
else if (PyObject_AsCharBuffer(sep_obj, &sep, &sep_len))
return NULL;
return partition(
return stringlib_partition(
(PyObject*) self,
PyString_AS_STRING(self), PyString_GET_SIZE(self),
sep_obj, sep, sep_len
@ -1579,7 +1579,7 @@ string_rpartition(PyStringObject *self, PyObject *sep_obj)
else if (PyObject_AsCharBuffer(sep_obj, &sep, &sep_len))
return NULL;
return rpartition(
return stringlib_rpartition(
(PyObject*) self,
PyString_AS_STRING(self), PyString_GET_SIZE(self),
sep_obj, sep, sep_len