From: Dag Sverre Seljebotn Date: Mon, 14 Jul 2008 14:26:05 +0000 (+0200) Subject: Fixed func(int[])-notation X-Git-Tag: 0.9.8.1~49^2~100 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1139758c67720229185ecf683a92527af587fcad;p=cython.git Fixed func(int[])-notation --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index af2bc392..a98f195d 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -1613,9 +1613,7 @@ def p_c_simple_base_type(s, self_flag, nonempty): # Treat trailing [] on type as buffer access - if 0: # s.sy == '[': - if is_basic: - s.error("Basic C types do not support buffer access") + if not is_basic and s.sy == '[': return p_buffer_access(s, type_node) else: return type_node diff --git a/tests/compile/carrdecl.pyx b/tests/compile/carrdecl.pyx new file mode 100644 index 00000000..44cba442 --- /dev/null +++ b/tests/compile/carrdecl.pyx @@ -0,0 +1,2 @@ +cdef extern: + cdef func(int[])