From 03c5c5353a2730290ccd7bbc3991402db9bff813 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Mon, 28 Apr 2008 11:21:33 -0700 Subject: [PATCH] Better error for foo(void) --- Cython/Compiler/Nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- 2.26.2