Commit 41fe46c7 authored by Stefan Behnel's avatar Stefan Behnel

minor pypy code improvements

parent 1ace3e16
...@@ -29,7 +29,7 @@ static PyObject* __Pyx_Globals(void) { ...@@ -29,7 +29,7 @@ static PyObject* __Pyx_Globals(void) {
goto bad; goto bad;
for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) {
#if CYTHON_COMPILING_IN_PYPY #if CYTHON_COMPILING_IN_PYPY
PyObject* name = PySequence_GetItem(names, i); PyObject* name = PySequence_ITEM(names, i);
if (!name) if (!name)
goto bad; goto bad;
#else #else
......
...@@ -533,7 +533,7 @@ static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr, ...@@ -533,7 +533,7 @@ static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr,
result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substr, i), result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substr, i),
start, end, direction); start, end, direction);
#else #else
PyObject* sub = PySequence_GetItem(substr, i); PyObject* sub = PySequence_ITEM(substr, i);
if (unlikely(!sub)) return -1; if (unlikely(!sub)) return -1;
result = PyUnicode_Tailmatch(s, sub, start, end, direction); result = PyUnicode_Tailmatch(s, sub, start, end, direction);
Py_DECREF(sub); Py_DECREF(sub);
...@@ -618,7 +618,7 @@ static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, Py_ssize_t ...@@ -618,7 +618,7 @@ static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, Py_ssize_t
result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substr, i), result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substr, i),
start, end, direction); start, end, direction);
#else #else
PyObject* sub = PySequence_GetItem(substr, i); PyObject* sub = PySequence_ITEM(substr, i);
if (unlikely(!sub)) return -1; if (unlikely(!sub)) return -1;
result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction); result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction);
Py_DECREF(sub); Py_DECREF(sub);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment