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
2a785d75
Commit
2a785d75
authored
Aug 16, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
882d16d1
69257409
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
6 deletions
+27
-6
Cython/Compiler/CythonScope.py
Cython/Compiler/CythonScope.py
+1
-1
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+1
-3
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+2
-2
tests/run/cdefkwargs.pyx
tests/run/cdefkwargs.pyx
+21
-0
tests/run/testinclude.pxi
tests/run/testinclude.pxi
+2
-0
No files found.
Cython/Compiler/CythonScope.py
View file @
2a785d75
...
...
@@ -13,7 +13,7 @@ class CythonScope(ModuleScope):
self
.
shape_entry
=
self
.
declare_cfunction
(
'shape'
,
shape_func_type
,
pos
=
None
,
visibility
=
'
public
'
,
visibility
=
'
extern
'
,
cname
=
'<error>'
)
def
create_cython_scope
(
context
):
...
...
Cython/Compiler/Parsing.py
View file @
2a785d75
...
...
@@ -533,9 +533,7 @@ def p_name(s, name):
return
ExprNodes
.
IntNode
(
pos
,
value
=
rep
,
longness
=
"L"
)
elif
isinstance
(
value
,
float
):
return
ExprNodes
.
FloatNode
(
pos
,
value
=
rep
)
elif
isinstance
(
value
,
unicode
):
return
ExprNodes
.
StringNode
(
pos
,
value
=
value
)
elif
isinstance
(
value
,
str
):
elif
isinstance
(
value
,
(
str
,
unicode
)):
return
ExprNodes
.
StringNode
(
pos
,
value
=
value
)
else
:
error
(
pos
,
"Invalid type for compile-time constant: %s"
...
...
Cython/Compiler/Symtab.py
View file @
2a785d75
...
...
@@ -440,7 +440,7 @@ class Scope:
if api:
entry.api = 1
if not defining and not in_pxd and visibility != 'extern':
error(pos, "
Non
-
extern
C
function
declared
but
not
defined
"
)
error(pos, "
Non
-
extern
C
function
'%s'
declared
but
not
defined
" % name
)
return entry
def add_cfunction(self, name, type, pos, cname, visibility):
...
...
@@ -686,7 +686,7 @@ class BuiltinScope(Scope):
# If python_equiv == "
*
", the Python equivalent has the same name
# as the entry, otherwise it has the name specified by python_equiv.
name = EncodedString(name)
entry = self.declare_cfunction(name, type, None, cname)
entry = self.declare_cfunction(name, type, None, cname
, visibility='extern'
)
entry.utility_code = utility_code
if python_equiv:
if python_equiv == "
*
":
...
...
tests/run/cdefkwargs.pyx
0 → 100644
View file @
2a785d75
__doc__
=
u"""
>>> call2()
>>> call3()
>>> call4()
"""
# the calls:
def
call2
():
b
(
1
,
2
)
def
call3
():
b
(
1
,
2
,
3
)
def
call4
():
b
(
1
,
2
,
3
,
4
)
# the called function:
cdef
b
(
a
,
b
,
c
=
1
,
d
=
2
):
pass
tests/run/testinclude.pxi
View file @
2a785d75
# this will be included
D
=
2
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