Lines Matching refs:newstr
464 PyObject *newstr; in strop_lower() local
470 newstr = PyString_FromStringAndSize(NULL, n); in strop_lower()
471 if (newstr == NULL) in strop_lower()
473 s_new = PyString_AsString(newstr); in strop_lower()
485 Py_DECREF(newstr); in strop_lower()
489 return newstr; in strop_lower()
503 PyObject *newstr; in strop_upper() local
509 newstr = PyString_FromStringAndSize(NULL, n); in strop_upper()
510 if (newstr == NULL) in strop_upper()
512 s_new = PyString_AsString(newstr); in strop_upper()
524 Py_DECREF(newstr); in strop_upper()
528 return newstr; in strop_upper()
543 PyObject *newstr; in strop_capitalize() local
549 newstr = PyString_FromStringAndSize(NULL, n); in strop_capitalize()
550 if (newstr == NULL) in strop_capitalize()
552 s_new = PyString_AsString(newstr); in strop_capitalize()
573 Py_DECREF(newstr); in strop_capitalize()
577 return newstr; in strop_capitalize()
722 PyObject *newstr; in strop_swapcase() local
728 newstr = PyString_FromStringAndSize(NULL, n); in strop_swapcase()
729 if (newstr == NULL) in strop_swapcase()
731 s_new = PyString_AsString(newstr); in strop_swapcase()
748 Py_DECREF(newstr); in strop_swapcase()
752 return newstr; in strop_swapcase()
1175 PyObject *newstr; in strop_replace() local
1199 newstr = PyTuple_GetItem(args, 0); in strop_replace()
1200 Py_XINCREF(newstr); in strop_replace()
1203 newstr = PyString_FromStringAndSize(new_s, out_len); in strop_replace()
1206 return newstr; in strop_replace()