Commit 03c5c535 authored by Robert Bradshaw's avatar Robert Bradshaw

Better error for foo(void)

parent 8568e5bf
...@@ -480,7 +480,7 @@ class CFuncDeclaratorNode(CDeclaratorNode): ...@@ -480,7 +480,7 @@ class CFuncDeclaratorNode(CDeclaratorNode):
type = PyrexTypes.c_ptr_type(type.base_type) type = PyrexTypes.c_ptr_type(type.base_type)
# Catch attempted C-style func(void) decl # Catch attempted C-style func(void) decl
if type.is_void: if type.is_void:
error(arg_node.pos, "Function argument cannot be void") error(arg_node.pos, "Use spam() rather than spam(void) to declare a function with no arguments.")
if type.is_pyobject and self.nogil: if type.is_pyobject and self.nogil:
error(self.pos, error(self.pos,
"Function with Python argument cannot be declared nogil") "Function with Python argument cannot be declared nogil")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment