Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
dc768221
Commit
dc768221
authored
Jun 20, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give the "__Pyx_PyObject_GetIterNext" helper macro a more explanatory name.
parent
cd3ce37d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-2
Cython/Utility/Coroutine.c
Cython/Utility/Coroutine.c
+4
-4
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+2
-2
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+1
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
dc768221
...
...
@@ -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_GetIterNext
Func
(%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_GetIterNext
Func
(%s);"
%
(
iternext_func
,
iterator_temp
))
unpacking_error_label
=
code
.
new_label
(
'unpacking_failed'
)
...
...
Cython/Utility/Coroutine.c
View file @
dc768221
...
...
@@ -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_GetIterNext
Func
(
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_GetIterNext
Func
(
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_GetIterNext
Func
(
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_GetIterNext
Func
(
yf
)(
yf
);
gen
->
is_running
=
0
;
//Py_DECREF(yf);
if
(
likely
(
ret
))
{
...
...
Cython/Utility/ModuleSetupCode.c
View file @
dc768221
...
...
@@ -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_GetIterNext
Func
(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_GetIterNext
Func
(obj) PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
...
...
Cython/Utility/ObjectHandling.c
View file @
dc768221
...
...
@@ -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_GetIterNext
Func
(
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment