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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
2826c424
Commit
2826c424
authored
Mar 27, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Step towards fixing #252
parent
926ad54d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-2
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-1
No files found.
Cython/Compiler/Nodes.py
View file @
2826c424
...
...
@@ -550,8 +550,7 @@ class CFuncDeclaratorNode(CDeclaratorNode):
if
self
.
optional_arg_count
:
scope
=
StructOrUnionScope
()
arg_count_member
=
'%sn'
%
Naming
.
pyrex_prefix
scope
.
declare_var
(
arg_count_member
,
PyrexTypes
.
c_int_type
,
self
.
pos
,
cname
=
arg_count_member
)
scope
.
declare_var
(
arg_count_member
,
PyrexTypes
.
c_int_type
,
self
.
pos
)
for
arg
in
func_type_args
[
len
(
func_type_args
)
-
self
.
optional_arg_count
:]:
scope
.
declare_var
(
arg
.
name
,
arg
.
type
,
arg
.
pos
,
allow_pyobject
=
1
)
struct_cname
=
env
.
mangle
(
Naming
.
opt_arg_prefix
,
self
.
base
.
name
)
...
...
Cython/Compiler/Symtab.py
View file @
2826c424
...
...
@@ -32,7 +32,7 @@ ansi_c_keywords = set(
def c_safe_identifier(cname):
# There are some C limitations on struct entry names.
if
cname[:2] == '__'
or cname in ansi_c_keywords:
if
(cname[:2] == '__' and not cname.startswith(Naming.pyrex_prefix))
or cname in ansi_c_keywords:
cname = Naming.pyrex_prefix + cname
return cname
...
...
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