Fixed func(int[])-notation
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Mon, 14 Jul 2008 14:26:05 +0000 (16:26 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Mon, 14 Jul 2008 14:26:05 +0000 (16:26 +0200)
Cython/Compiler/Parsing.py
tests/compile/carrdecl.pyx [new file with mode: 0644]

index af2bc392c509d81efa59973634e207e48e8f3fc0..a98f195d0611050fa35685d74e4d5fb34769f269 100644 (file)
@@ -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 (file)
index 0000000..44cba44
--- /dev/null
@@ -0,0 +1,2 @@
+cdef extern:
+    cdef func(int[])