Commit 14267e2e authored by Stefan Behnel's avatar Stefan Behnel

Fix incrementally increasing indentation level in utility functions due to...

Fix incrementally increasing indentation level in utility functions due to repeated opening braces inside of C preprocessor conditionals.
parent e54d6dc1
...@@ -135,10 +135,11 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) ...@@ -135,10 +135,11 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
PyObject *tmp; PyObject *tmp;
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
if (unlikely(value == NULL || !PyUnicode_Check(value))) { if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else #else
if (unlikely(value == NULL || !PyString_Check(value))) { if (unlikely(value == NULL || !PyString_Check(value)))
#endif #endif
{
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"__name__ must be set to a string object"); "__name__ must be set to a string object");
return -1; return -1;
...@@ -163,10 +164,11 @@ __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) ...@@ -163,10 +164,11 @@ __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
PyObject *tmp; PyObject *tmp;
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
if (unlikely(value == NULL || !PyUnicode_Check(value))) { if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else #else
if (unlikely(value == NULL || !PyString_Check(value))) { if (unlikely(value == NULL || !PyString_Check(value)))
#endif #endif
{
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"__qualname__ must be set to a string object"); "__qualname__ must be set to a string object");
return -1; return -1;
...@@ -1227,7 +1229,7 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { ...@@ -1227,7 +1229,7 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#else #else
#if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY #if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY
// special C-API function only in Pyston and PyPy >= 5.9 // special C-API function only in Pyston and PyPy >= 5.9
if (PyMethodDescr_Check(method)) { if (PyMethodDescr_Check(method))
#else #else
// It appears that PyMethodDescr_Type is not exposed anywhere in the CPython C-API // It appears that PyMethodDescr_Type is not exposed anywhere in the CPython C-API
static PyTypeObject *methoddescr_type = NULL; static PyTypeObject *methoddescr_type = NULL;
...@@ -1237,8 +1239,9 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { ...@@ -1237,8 +1239,9 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
methoddescr_type = Py_TYPE(meth); methoddescr_type = Py_TYPE(meth);
Py_DECREF(meth); Py_DECREF(meth);
} }
if (__Pyx_TypeCheck(method, methoddescr_type)) { if (__Pyx_TypeCheck(method, methoddescr_type))
#endif #endif
{
// cdef classes // cdef classes
PyMethodDescrObject *descr = (PyMethodDescrObject *)method; PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
#if PY_VERSION_HEX < 0x03020000 #if PY_VERSION_HEX < 0x03020000
......
...@@ -1204,26 +1204,26 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) ...@@ -1204,26 +1204,26 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
result = _PyDict_GetItem_KnownHash($moddict_cname, name, ((PyASCIIObject *) name)->hash); result = _PyDict_GetItem_KnownHash($moddict_cname, name, ((PyASCIIObject *) name)->hash);
__PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version)
if (likely(result)) { if (likely(result)) {
Py_INCREF(result); return __Pyx_NewRef(result);
} else if (unlikely(PyErr_Occurred())) { } else if (unlikely(PyErr_Occurred())) {
result = NULL; return NULL;
} else { }
#else #else
result = PyDict_GetItem($moddict_cname, name); result = PyDict_GetItem($moddict_cname, name);
__PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version)
if (likely(result)) { if (likely(result)) {
Py_INCREF(result); return __Pyx_NewRef(result);
} else { }
#endif #endif
#else #else
result = PyObject_GetItem($moddict_cname, name); result = PyObject_GetItem($moddict_cname, name);
__PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version)
if (!result) { if (likely(result)) {
PyErr_Clear(); return __Pyx_NewRef(result);
#endif
result = __Pyx_GetBuiltinName(name);
} }
return result; PyErr_Clear();
#endif
return __Pyx_GetBuiltinName(name);
} }
//////////////////// GetAttr.proto //////////////////// //////////////////// GetAttr.proto ////////////////////
......
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