{
char *s, *s_new;
Py_ssize_t i, n;
- PyObject *new;
+ PyObject *newstr;
int changed;
WARN;
if (PyString_AsStringAndSize(args, &s, &n))
return NULL;
- new = PyString_FromStringAndSize(NULL, n);
- if (new == NULL)
+ newstr = PyString_FromStringAndSize(NULL, n);
+ if (newstr == NULL)
return NULL;
- s_new = PyString_AsString(new);
+ s_new = PyString_AsString(newstr);
changed = 0;
for (i = 0; i < n; i++) {
int c = Py_CHARMASK(*s++);
s_new++;
}
if (!changed) {
- Py_DECREF(new);
+ Py_DECREF(newstr);
Py_INCREF(args);
return args;
}
- return new;
+ return newstr;
}
{
char *s, *s_new;
Py_ssize_t i, n;
- PyObject *new;
+ PyObject *newstr;
int changed;
WARN;
if (PyString_AsStringAndSize(args, &s, &n))
return NULL;
- new = PyString_FromStringAndSize(NULL, n);
- if (new == NULL)
+ newstr = PyString_FromStringAndSize(NULL, n);
+ if (newstr == NULL)
return NULL;
- s_new = PyString_AsString(new);
+ s_new = PyString_AsString(newstr);
changed = 0;
for (i = 0; i < n; i++) {
int c = Py_CHARMASK(*s++);
s_new++;
}
if (!changed) {
- Py_DECREF(new);
+ Py_DECREF(newstr);
Py_INCREF(args);
return args;
}
- return new;
+ return newstr;
}
{
char *s, *s_new;
Py_ssize_t i, n;
- PyObject *new;
+ PyObject *newstr;
int changed;
WARN;
if (PyString_AsStringAndSize(args, &s, &n))
return NULL;
- new = PyString_FromStringAndSize(NULL, n);
- if (new == NULL)
+ newstr = PyString_FromStringAndSize(NULL, n);
+ if (newstr == NULL)
return NULL;
- s_new = PyString_AsString(new);
+ s_new = PyString_AsString(newstr);
changed = 0;
if (0 < n) {
int c = Py_CHARMASK(*s++);
s_new++;
}
if (!changed) {
- Py_DECREF(new);
+ Py_DECREF(newstr);
Py_INCREF(args);
return args;
}
- return new;
+ return newstr;
}
{
char *s, *s_new;
Py_ssize_t i, n;
- PyObject *new;
+ PyObject *newstr;
int changed;
WARN;
if (PyString_AsStringAndSize(args, &s, &n))
return NULL;
- new = PyString_FromStringAndSize(NULL, n);
- if (new == NULL)
+ newstr = PyString_FromStringAndSize(NULL, n);
+ if (newstr == NULL)
return NULL;
- s_new = PyString_AsString(new);
+ s_new = PyString_AsString(newstr);
changed = 0;
for (i = 0; i < n; i++) {
int c = Py_CHARMASK(*s++);
s_new++;
}
if (!changed) {
- Py_DECREF(new);
+ Py_DECREF(newstr);
Py_INCREF(args);
return args;
}
- return new;
+ return newstr;
}
char *str, *pat,*sub,*new_s;
Py_ssize_t len,pat_len,sub_len,out_len;
Py_ssize_t count = -1;
- PyObject *new;
+ PyObject *newstr;
WARN;
if (!PyArg_ParseTuple(args, "t#t#t#|n:replace",
}
if (out_len == -1) {
/* we're returning another reference to the input string */
- new = PyTuple_GetItem(args, 0);
- Py_XINCREF(new);
+ newstr = PyTuple_GetItem(args, 0);
+ Py_XINCREF(newstr);
}
else {
- new = PyString_FromStringAndSize(new_s, out_len);
+ newstr = PyString_FromStringAndSize(new_s, out_len);
PyMem_FREE(new_s);
}
- return new;
+ return newstr;
}