Commit c9f2f977 authored by Robert Bradshaw's avatar Robert Bradshaw

Merge branch 'master' of github.com:cython/cython

parents fd9df8e5 ccc69c11
......@@ -210,14 +210,14 @@ def builtin_type_methods():
append(1)
assert l == [1], str(l)
cdef int func(int x):
cdef int cfunc(int x):
return x+1
def c_functions():
"""
>>> c_functions()
"""
f = func
f = cfunc
assert typeof(f) == 'int (*)(int)', typeof(f)
assert 2 == f(1)
......@@ -424,6 +424,15 @@ def safe_only():
res = -j
assert typeof(j) == "Python object", typeof(j)
@infer_types(None)
def safe_c_functions():
"""
>>> safe_c_functions()
"""
f = cfunc
assert typeof(f) == 'int (*)(int)', typeof(f)
assert 2 == f(1)
@infer_types(None)
def args_tuple_keywords(*args, **kwargs):
"""
......
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