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
db243fcb
Commit
db243fcb
authored
Aug 20, 2010
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
previous commit broke numpy buffer access for Py<=2.4
parent
bb13f3b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+10
-11
No files found.
Cython/Compiler/Nodes.py
View file @
db243fcb
...
...
@@ -1216,11 +1216,18 @@ class FuncDefNode(StatNode, BlockNode):
is_releasebuffer_slot
=
(
self
.
entry
.
name
==
"__releasebuffer__"
and
self
.
entry
.
scope
.
is_c_class_scope
)
is_buffer_slot
=
is_getbuffer_slot
or
is_releasebuffer_slot
is_index_slot
=
(
self
.
entry
.
name
==
"__index__"
and
self
.
entry
.
scope
.
is_c_class_scope
)
if
is_buffer_slot
or
is_index_slot
:
if
is_buffer_slot
:
if
'cython_unused'
not
in
self
.
modifiers
:
self
.
modifiers
=
self
.
modifiers
+
[
'cython_unused'
]
preprocessor_guard
=
None
if
self
.
entry
.
is_special
and
not
is_buffer_slot
:
slot
=
TypeSlots
.
method_name_to_slot
.
get
(
self
.
entry
.
name
)
if
slot
:
preprocessor_guard
=
slot
.
preprocessor_guard_code
()
if
(
self
.
entry
.
name
==
'__long__'
and
not
self
.
entry
.
scope
.
lookup_here
(
'__int__'
)):
preprocessor_guard
=
None
profile
=
code
.
globalstate
.
directives
[
'profile'
]
if
profile
:
...
...
@@ -1238,14 +1245,6 @@ class FuncDefNode(StatNode, BlockNode):
# ----- Function header
code
.
putln
(
""
)
preprocessor_guard
=
None
if
self
.
entry
.
is_special
:
slot
=
TypeSlots
.
method_name_to_slot
.
get
(
self
.
entry
.
name
)
if
slot
:
preprocessor_guard
=
slot
.
preprocessor_guard_code
()
if
(
self
.
entry
.
name
==
'__long__'
and
not
self
.
entry
.
scope
.
lookup_here
(
'__int__'
)):
preprocessor_guard
=
None
if
preprocessor_guard
:
code
.
putln
(
preprocessor_guard
)
...
...
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