Better error message for lack of pointer buffers support. 0.10.3
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Tue, 16 Dec 2008 09:09:52 +0000 (10:09 +0100)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Tue, 16 Dec 2008 09:09:52 +0000 (10:09 +0100)
Cython/Compiler/Buffer.py

index ac1e5401a2825ee83bf27b48bec0484705a31abd..947469e025733e29307b065e96f1a6a4bc0a03d0 100644 (file)
@@ -64,6 +64,9 @@ class IntroduceBufferAuxiliaryVars(CythonTransform):
             # for now...note that pos is wrong 
             raise CompileError(node.pos, "Buffer vars not allowed in module scope")
         for entry in bufvars:
+            if entry.type.dtype.is_ptr:
+                raise CompileError(node.pos, "Buffers with pointer types not yet supported.")
+            
             name = entry.name
             buftype = entry.type
             if buftype.ndim > self.max_ndim: