Commit 2a785d75 authored by Robert Bradshaw's avatar Robert Bradshaw

merge

parents 882d16d1 69257409
......@@ -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):
......
......@@ -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"
......
......@@ -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 == "*":
......
__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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment