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
fdae4c23
Commit
fdae4c23
authored
Nov 10, 2007
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix agreement of cpdef functions and pxd files
parent
d3abf408
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-1
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+4
-2
No files found.
Cython/Compiler/Nodes.py
View file @
fdae4c23
...
...
@@ -351,7 +351,7 @@ class CFuncDeclaratorNode(CDeclaratorNode):
return_type
,
func_type_args
,
self
.
has_varargs
,
exception_value
=
exc_val
,
exception_check
=
exc_check
,
calling_convention
=
self
.
base
.
calling_convention
,
nogil
=
self
.
nogil
,
with_gil
=
self
.
with_gil
)
nogil
=
self
.
nogil
,
with_gil
=
self
.
with_gil
,
is_overridable
=
self
.
overridable
)
return
self
.
base
.
analyse
(
func_type
,
env
)
...
...
Cython/Compiler/Parsing.py
View file @
fdae4c23
...
...
@@ -1300,7 +1300,7 @@ def p_statement(s, level, cdef_flag = 0, visibility = 'private', api = 0):
if
level
not
in
(
'module'
,
'module_pxd'
):
s
.
error
(
"ctypedef statement not allowed here"
)
if
api
:
error
(
s
.
pos
,
"'api' not allowed with 'ctypedef'"
)
error
(
s
.
pos
ition
()
,
"'api' not allowed with 'ctypedef'"
)
return
p_ctypedef_statement
(
s
,
level
,
visibility
,
api
)
elif
s
.
sy
==
'DEF'
:
return
p_DEF_statement
(
s
)
...
...
@@ -1859,6 +1859,7 @@ def p_c_func_or_var_declaration(s, level, pos, visibility = 'private', api = 0,
modifiers
=
p_c_modifiers
(
s
)
base_type
=
p_c_base_type
(
s
)
declarator
=
p_c_declarator
(
s
,
cmethod_flag
=
cmethod_flag
,
assignable
=
1
,
nonempty
=
1
)
declarator
.
overridable
=
overridable
if
s
.
sy
==
':'
:
if
level
not
in
(
'module'
,
'c_class'
):
s
.
error
(
"C function definition not allowed here"
)
...
...
@@ -1888,7 +1889,8 @@ def p_c_func_or_var_declaration(s, level, pos, visibility = 'private', api = 0,
base_type
=
base_type
,
declarators
=
declarators
,
in_pxd
=
level
==
'module_pxd'
,
api
=
api
)
api
=
api
,
overridable
=
overridable
)
return
result
def
p_ctypedef_statement
(
s
,
level
,
visibility
=
'private'
,
api
=
0
):
...
...
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