parsers._asciilower: use an explicit return object
No functional change, but this will make upcoming patches cleaner.
--- a/mercurial/parsers.c Tue Mar 31 10:25:29 2015 -0700
+++ b/mercurial/parsers.c Wed Apr 01 13:58:51 2015 -0700
@@ -98,6 +98,7 @@
char *str, *newstr;
Py_ssize_t i, len;
PyObject *newobj = NULL;
+ PyObject *ret = NULL;
str = PyBytes_AS_STRING(str_obj);
len = PyBytes_GET_SIZE(str_obj);
@@ -121,10 +122,11 @@
newstr[i] = lowertable[(unsigned char)c];
}
- return newobj;
+ ret = newobj;
+ Py_INCREF(ret);
quit:
Py_XDECREF(newobj);
- return NULL;
+ return ret;
}
static PyObject *asciilower(PyObject *self, PyObject *args)