summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/partition.h
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringlib/partition.h')
-rw-r--r--Objects/stringlib/partition.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/Objects/stringlib/partition.h b/Objects/stringlib/partition.h
index 0170bdd..40cb512 100644
--- a/Objects/stringlib/partition.h
+++ b/Objects/stringlib/partition.h
@@ -1,14 +1,11 @@
/* stringlib: partition implementation */
-#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_INLINE(PyObject*)
-stringlib_partition(PyObject* str_obj,
+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)
@@ -25,7 +22,7 @@ stringlib_partition(PyObject* str_obj,
if (!out)
return NULL;
- pos = fastsearch(str, str_len, sep, sep_len, -1, FAST_SEARCH);
+ pos = FASTSEARCH(str, str_len, sep, sep_len, -1, FAST_SEARCH);
if (pos < 0) {
#if STRINGLIB_MUTABLE
@@ -58,7 +55,7 @@ stringlib_partition(PyObject* str_obj,
}
Py_LOCAL_INLINE(PyObject*)
-stringlib_rpartition(PyObject* str_obj,
+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)
@@ -75,7 +72,7 @@ stringlib_rpartition(PyObject* str_obj,
if (!out)
return NULL;
- pos = fastsearch(str, str_len, sep, sep_len, -1, FAST_RSEARCH);
+ pos = FASTSEARCH(str, str_len, sep, sep_len, -1, FAST_RSEARCH);
if (pos < 0) {
#if STRINGLIB_MUTABLE
@@ -107,4 +104,3 @@ stringlib_rpartition(PyObject* str_obj,
return out;
}
-#endif