Lines Matching defs:suffix
151 "removesuffix($self, suffix, /)\n"
154 "Return a bytearray with the given suffix string removed if present.\n"
156 "If the bytearray ends with the suffix string and that suffix is not\n"
157 "empty, return bytearray[:-len(suffix)]. Otherwise, return a copy of\n"
164 bytearray_removesuffix_impl(PyByteArrayObject *self, Py_buffer *suffix);
170 Py_buffer suffix = {NULL, NULL};
172 if (PyObject_GetBuffer(arg, &suffix, PyBUF_SIMPLE) != 0) {
175 if (!PyBuffer_IsContiguous(&suffix, 'C')) {
179 return_value = bytearray_removesuffix_impl(self, &suffix);
182 /* Cleanup for suffix */
183 if (suffix.obj) {
184 PyBuffer_Release(&suffix);