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
Boxiang Sun
cython
Commits
b94cd5b2
Commit
b94cd5b2
authored
Oct 15, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove redundant overhead in the __Pyx_(Get|Set|Del)ItemInt_Fast() functions
parent
82eecb28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+3
-3
No files found.
Cython/Compiler/ExprNodes.py
View file @
b94cd5b2
...
...
@@ -9278,7 +9278,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i)
Py_INCREF(r);
}
else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
r = Py
Sequence_GetI
tem(o, i);
r = Py
_TYPE(o)->tp_as_sequence->sq_i
tem(o, i);
}
else {
r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
...
...
@@ -9315,7 +9315,7 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje
return 1;
}
else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && (likely(i >= 0)))
return Py
Sequence_SetI
tem(o, i, v);
return Py
_TYPE(o)->tp_as_sequence->sq_ass_i
tem(o, i, v);
else {
PyObject *j = PyInt_FromSsize_t(i);
return __Pyx_SetItemInt_Generic(o, j, v);
...
...
@@ -9343,7 +9343,7 @@ static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i) {
if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && likely(i >= 0))
return Py
Sequence_DelItem(o, i
);
return Py
_TYPE(o)->tp_as_sequence->sq_ass_item(o, i, (PyObject *)NULL
);
else {
PyObject *j = PyInt_FromSsize_t(i);
return __Pyx_DelItem_Generic(o, j);
...
...
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