Skip to content

Commit 5189238

Browse files
Update str_ops.c
1 parent bfeda37 commit 5189238

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mypyc/lib-rt/str_ops.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,10 @@ PyObject *CPy_Encode(PyObject *obj, PyObject *encoding, PyObject *errors) {
511511
}
512512
}
513513

514-
Py_ssize_t CPyStr_CountAll(PyObject *unicode, PyObject *substring) {
515-
Py_ssize_t end = PyUnicode_GET_LENGTH(self);
516-
return PyUnicode_Count(unicode, substring, 0, end);
514+
Py_ssize_t CPyStr_Count(PyObject *unicode, PyObject *substring, Py_ssize_t start) {
515+
Py_ssize_t end = PyUnicode_GET_LENGTH(unicode);
516+
return PyUnicode_Count(unicode, substring, start, end);
517+
}
517518

518519

519520
CPyTagged CPyStr_Ord(PyObject *obj) {

0 commit comments

Comments
 (0)