needforspeed: stringlib refactoring, continued. added count and
find helpers; updated unicodeobject to use stringlib_count
diff --git a/Objects/stringlib/partition.h b/Objects/stringlib/partition.h
index 71e80a9..8cc7abe 100644
--- a/Objects/stringlib/partition.h
+++ b/Objects/stringlib/partition.h
@@ -3,9 +3,15 @@
#ifndef STRINGLIB_PARTITION_H
#define STRINGLIB_PARTITION_H
+#ifndef STRINGLIB_FASTSEARCH_H
+#error must include "stringlib/fastsearch.h" before including this module
+#endif
+
Py_LOCAL(PyObject*)
-partition(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len,
- PyObject* sep_obj, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len)
+stringlib_partition(
+ PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len,
+ PyObject* sep_obj, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len
+ )
{
PyObject* out;
Py_ssize_t pos;
@@ -46,8 +52,10 @@
}
Py_LOCAL(PyObject*)
-rpartition(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len,
- PyObject* sep_obj, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len)
+stringlib_rpartition(
+ PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len,
+ PyObject* sep_obj, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len
+ )
{
PyObject* out;
Py_ssize_t pos;