Commit 1c8d21e1 authored by Stefan Behnel's avatar Stefan Behnel

Add some missing branch hints.

parent 04d918f6
...@@ -383,7 +383,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, ...@@ -383,7 +383,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
PyObject *r; PyObject *r;
if (!j) return NULL; if (unlikely(!j)) return NULL;
r = PyObject_GetItem(o, j); r = PyObject_GetItem(o, j);
Py_DECREF(j); Py_DECREF(j);
return r; return r;
...@@ -479,7 +479,7 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje ...@@ -479,7 +479,7 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
int r; int r;
if (!j) return -1; if (unlikely(!j)) return -1;
r = PyObject_SetItem(o, j, v); r = PyObject_SetItem(o, j, v);
Py_DECREF(j); Py_DECREF(j);
return r; return r;
...@@ -554,7 +554,7 @@ static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, ...@@ -554,7 +554,7 @@ static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) { static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
int r; int r;
if (!j) return -1; if (unlikely(!j)) return -1;
r = PyObject_DelItem(o, j); r = PyObject_DelItem(o, j);
Py_DECREF(j); Py_DECREF(j);
return r; return r;
...@@ -966,10 +966,10 @@ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *na ...@@ -966,10 +966,10 @@ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *na
PyObject *result; PyObject *result;
PyObject *metaclass; PyObject *metaclass;
if (PyDict_SetItem(dict, PYIDENT("__module__"), modname) < 0) if (unlikely(PyDict_SetItem(dict, PYIDENT("__module__"), modname) < 0))
return NULL; return NULL;
#if PY_VERSION_HEX >= 0x03030000 #if PY_VERSION_HEX >= 0x03030000
if (PyDict_SetItem(dict, PYIDENT("__qualname__"), qualname) < 0) if (unlikely(PyDict_SetItem(dict, PYIDENT("__qualname__"), qualname) < 0))
return NULL; return NULL;
#else #else
CYTHON_MAYBE_UNUSED_VAR(qualname); CYTHON_MAYBE_UNUSED_VAR(qualname);
...@@ -1619,7 +1619,7 @@ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **me ...@@ -1619,7 +1619,7 @@ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **me
goto try_unpack; goto try_unpack;
} }
if (descr != NULL) { if (likely(descr != NULL)) {
*method = descr; *method = descr;
return 0; return 0;
} }
......
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