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
26c22923
Commit
26c22923
authored
Feb 12, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-robertwb'
parents
d1e5d1f6
be403527
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+7
-1
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+13
-0
docs/src/tutorial/queue_example/queue.pyx
docs/src/tutorial/queue_example/queue.pyx
+0
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
26c22923
...
...
@@ -3172,6 +3172,12 @@ class IndexNode(ExprNode):
def
generate_setitem_code
(
self
,
value_code
,
code
):
if
self
.
index
.
type
.
is_int
:
if
(
self
.
base
.
type
.
is_builtin_type
and
self
.
base
.
type
.
name
==
"list"
and
not
code
.
globalstate
.
directives
[
'wraparound'
]
and
not
code
.
globalstate
.
directives
[
'boundscheck'
]):
function
=
"__Pyx_SetItemListInt_NoCheck"
else
:
function
=
"__Pyx_SetItemInt"
index_code
=
self
.
index
.
result
()
code
.
globalstate
.
use_utility_code
(
...
...
Cython/Utility/ObjectHandling.c
View file @
26c22923
...
...
@@ -354,6 +354,19 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje
return
__Pyx_SetItemInt_Generic
(
o
,
PyInt_FromSsize_t
(
i
),
v
);
}
#define __Pyx_SetItemListInt_NoCheck(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
__Pyx_SetItemIntList_NoCheck(o, i, v) : \
__Pyx_SetItemInt_Generic(o, to_py_func(i), v))
static
CYTHON_INLINE
int
__Pyx_SetItemIntList_NoCheck
(
PyObject
*
o
,
Py_ssize_t
n
,
PyObject
*
v
)
{
PyObject
*
old
=
PyList_GET_ITEM
(
o
,
n
);
Py_INCREF
(
v
);
PyList_SET_ITEM
(
o
,
n
,
v
);
Py_DECREF
(
old
);
return
1
;
}
/////////////// DelItemInt.proto ///////////////
#define __Pyx_DelItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
...
...
docs/src/tutorial/queue_example/queue.pyx
View file @
26c22923
cimport
cqueue
cimport
python_exc
cdef
class
Queue
:
...
...
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