Commit dc768221 authored by Stefan Behnel's avatar Stefan Behnel

Give the "__Pyx_PyObject_GetIterNext" helper macro a more explanatory name.

parent cd3ce37d
......@@ -2808,7 +2808,7 @@ class IteratorNode(ExprNode):
# PyObject_GetIter() fails if "tp_iternext" is not set, but the check below
# makes it visible to the C compiler that the pointer really isn't NULL, so that
# it can distinguish between the special cases and the generic case
code.putln("%s = __Pyx_PyObject_GetIterNext(%s); %s" % (
code.putln("%s = __Pyx_PyObject_GetIterNextFunc(%s); %s" % (
self.iter_func_ptr, self.py_result(),
code.error_goto_if_null(self.iter_func_ptr, self.pos)))
if self.may_be_a_sequence:
......@@ -7775,7 +7775,7 @@ class SequenceNode(ExprNode):
rhs.generate_disposal_code(code)
iternext_func = code.funcstate.allocate_temp(self._func_iternext_type, manage_ref=False)
code.putln("%s = __Pyx_PyObject_GetIterNext(%s);" % (
code.putln("%s = __Pyx_PyObject_GetIterNextFunc(%s);" % (
iternext_func, iterator_temp))
unpacking_error_label = code.new_label('unpacking_failed')
......
......@@ -44,7 +44,7 @@ static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject
return NULL;
}
// source_gen is now the iterator, make the first next() call
retval = __Pyx_PyObject_GetIterNext(source_gen)(source_gen);
retval = __Pyx_PyObject_GetIterNextFunc(source_gen)(source_gen);
}
if (likely(retval)) {
gen->yieldfrom = source_gen;
......@@ -73,7 +73,7 @@ static PyObject* __Pyx__Coroutine_Yield_From_Generic(__pyx_CoroutineObject *gen,
if (__Pyx_Coroutine_Check(source_gen)) {
retval = __Pyx_Generator_Next(source_gen);
} else {
retval = __Pyx_PyObject_GetIterNext(source_gen)(source_gen);
retval = __Pyx_PyObject_GetIterNextFunc(source_gen)(source_gen);
}
if (retval) {
gen->yieldfrom = source_gen;
......@@ -849,7 +849,7 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
#endif
{
if (value == Py_None)
ret = __Pyx_PyObject_GetIterNext(yf)(yf);
ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
else
ret = __Pyx_PyObject_CallMethod1(yf, PYIDENT("send"), value);
}
......@@ -947,7 +947,7 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) {
ret = __Pyx_Coroutine_Send(yf, Py_None);
} else
#endif
ret = __Pyx_PyObject_GetIterNext(yf)(yf);
ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
gen->is_running = 0;
//Py_DECREF(yf);
if (likely(ret)) {
......
......@@ -711,10 +711,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#define __Pyx_PyObject_GetIterNext(obj) (Py_TYPE(obj)->tp_iternext)
#define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext)
#else
#define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
#define __Pyx_PyObject_GetIterNext(obj) PyIter_Next
#define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
......
......@@ -133,7 +133,7 @@ static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyOb
if (unlikely(!iter)) goto bad;
if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
iternext = __Pyx_PyObject_GetIterNext(iter);
iternext = __Pyx_PyObject_GetIterNextFunc(iter);
value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
......
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