From 1139758c67720229185ecf683a92527af587fcad Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Mon, 14 Jul 2008 16:26:05 +0200 Subject: [PATCH] Fixed func(int[])-notation --- Cython/Compiler/Parsing.py | 4 +--- tests/compile/carrdecl.pyx | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 tests/compile/carrdecl.pyx 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[]) -- 2.26.2