Lines Matching refs:old
293 "replace($self, old, new, count=-1, /)\n"
296 "Return a copy with all occurrences of substring old replaced by new.\n"
309 bytearray_replace_impl(PyByteArrayObject *self, Py_buffer *old,
316 Py_buffer old = {NULL, NULL};
323 if (PyObject_GetBuffer(args[0], &old, PyBUF_SIMPLE) != 0) {
326 if (!PyBuffer_IsContiguous(&old, 'C')) {
353 return_value = bytearray_replace_impl(self, &old, &new, count);
356 /* Cleanup for old */
357 if (old.obj) {
358 PyBuffer_Release(&old);