summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/find.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-23 18:04:37 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-23 18:04:37 (GMT)
commit9db1a8b69f13f884336556b61252f7ca271f2b76 (patch)
treeedf3c6bad006095a92427022e3a47005c045c4ff /Objects/stringlib/find.h
parent0d60e87ad6d992c8b989dfa1909a2fd8e853ee9a (diff)
downloadcpython-9db1a8b69f13f884336556b61252f7ca271f2b76.zip
cpython-9db1a8b69f13f884336556b61252f7ca271f2b76.tar.gz
cpython-9db1a8b69f13f884336556b61252f7ca271f2b76.tar.bz2
Replace PyUnicodeObject* by PyObject* where it was irrevelant
A Unicode string can now be a PyASCIIObject, PyCompactUnicodeObject or PyUnicodeObject. Aliasing a PyASCIIObject* or PyCompactUnicodeObject* to PyUnicodeObject* is wrong
Diffstat (limited to 'Objects/stringlib/find.h')
-rw-r--r--Objects/stringlib/find.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/stringlib/find.h b/Objects/stringlib/find.h
index 00eaf1b..26b6ce4 100644
--- a/Objects/stringlib/find.h
+++ b/Objects/stringlib/find.h
@@ -95,7 +95,7 @@ This function is a helper for the "find" family (find, rfind, index,
rindex) and for count, startswith and endswith, because they all have
the same behaviour for the arguments.
-It does not touch the variables received until it knows everything
+It does not touch the variables received until it knows everything
is ok.
*/
@@ -145,13 +145,13 @@ first argument is a unicode object.
Note that we receive a pointer to the pointer of the substring object,
so when we create that object in this function we don't DECREF it,
-because it continues living in the caller functions (those functions,
+because it continues living in the caller functions (those functions,
after finishing using the substring, must DECREF it).
*/
Py_LOCAL_INLINE(int)
STRINGLIB(parse_args_finds_unicode)(const char * function_name, PyObject *args,
- PyUnicodeObject **substring,
+ PyObject **substring,
Py_ssize_t *start, Py_ssize_t *end)
{
PyObject *tmp_substring;
@@ -161,7 +161,7 @@ STRINGLIB(parse_args_finds_unicode)(const char * function_name, PyObject *args,
tmp_substring = PyUnicode_FromObject(tmp_substring);
if (!tmp_substring)
return 0;
- *substring = (PyUnicodeObject *)tmp_substring;
+ *substring = tmp_substring;
return 1;
}
return 0;