From: Robert Bradshaw Date: Mon, 28 Apr 2008 18:21:33 +0000 (-0700) Subject: Better error for foo(void) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=03c5c5353a2730290ccd7bbc3991402db9bff813;p=cython.git Better error for foo(void) --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 544b9cd9..54c58b0f 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -480,7 +480,7 @@ class CFuncDeclaratorNode(CDeclaratorNode): type = PyrexTypes.c_ptr_type(type.base_type) # Catch attempted C-style func(void) decl 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: error(self.pos, "Function with Python argument cannot be declared nogil")