From: Robert Bradshaw Date: Wed, 10 Oct 2007 10:19:20 +0000 (-0700) Subject: Error message (rather than traceback) on missing name in cdef declarator X-Git-Tag: 0.9.6.14~29^2~125 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=bc3427caf480cd20e3435b60abea10e7fae87909;p=cython.git Error message (rather than traceback) on missing name in cdef declarator --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 80cffc31..8976cd7a 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -429,6 +429,9 @@ class CVarDefNode(StatNode): "Python object cannot be declared extern") name = name_declarator.name cname = name_declarator.cname + if name == '': + error(declarator.pos, "Missing name in declaration.") + return if type.is_cfunction: dest_scope.declare_cfunction(name, type, declarator.pos, cname = cname, visibility = self.visibility)