Fix #559, <void *> [] is not caught by Cython but by gcc
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 12 Dec 2010 05:10:52 +0000 (21:10 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 12 Dec 2010 05:10:52 +0000 (21:10 -0800)
Cython/Compiler/ExprNodes.py

index 0e89b311ff04d5b142c0eb165c81e978aa8f0218..9482905da712e3f888b5b1e9bcec24f822096c81 100755 (executable)
@@ -4045,7 +4045,7 @@ class ListNode(SequenceNode):
             self.obj_conversion_errors = []
             if not self.type.subtype_of(dst_type):
                 error(self.pos, "Cannot coerce list to type '%s'" % dst_type)
-        elif dst_type.is_ptr:
+        elif dst_type.is_ptr and dst_type.base_type is not PyrexTypes.c_void_type:
             base_type = dst_type.base_type
             self.type = PyrexTypes.CArrayType(base_type, len(self.args))
             for i in range(len(self.original_args)):