Lines Matching refs:sub_obj
1151 string_contains(PyObject *str_obj, PyObject *sub_obj) in string_contains() argument
1153 if (!PyString_CheckExact(sub_obj)) { in string_contains()
1155 if (PyUnicode_Check(sub_obj)) in string_contains()
1156 return PyUnicode_Contains(str_obj, sub_obj); in string_contains()
1158 if (!PyString_Check(sub_obj)) { in string_contains()
1161 "not %.200s", Py_TYPE(sub_obj)->tp_name); in string_contains()
1166 return stringlib_contains_obj(str_obj, sub_obj); in string_contains()
2122 PyObject *sub_obj; in string_count() local
2127 if (!stringlib_parse_args_finds("count", args, &sub_obj, &start, &end)) in string_count()
2130 if (PyString_Check(sub_obj)) { in string_count()
2131 sub = PyString_AS_STRING(sub_obj); in string_count()
2132 sub_len = PyString_GET_SIZE(sub_obj); in string_count()
2135 else if (PyUnicode_Check(sub_obj)) { in string_count()
2137 count = PyUnicode_Count((PyObject *)self, sub_obj, start, end); in string_count()
2144 else if (PyObject_AsCharBuffer(sub_obj, &sub, &sub_len)) in string_count()