From: Stefan Behnel Date: Fri, 26 Nov 2010 12:41:29 +0000 (+0100) Subject: fix unknown names in Nodes.py X-Git-Tag: 0.14.alpha0~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ae8d088969bc5300e6d61f1018dc7d5f8de72d0e;p=cython.git fix unknown names in Nodes.py --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index cbc4533b..0b39523c 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -949,7 +949,7 @@ class CVarDefNode(StatNode): entry.directive_locals = self.directive_locals else: if self.directive_locals: - s.error("Decorators can only be followed by functions") + error(self.pos, "Decorators can only be followed by functions") if self.in_pxd and self.visibility != 'extern': error(self.pos, "Only 'extern' C variable declaration allowed in .pxd file") @@ -3215,7 +3215,7 @@ class CClassDefNode(ClassDefNode): api = self.api, buffer_defaults = buffer_defaults) if home_scope is not env and self.visibility == 'extern': - env.add_imported_entry(self.class_name, self.entry, pos) + env.add_imported_entry(self.class_name, self.entry, self.pos) self.scope = scope = self.entry.type.scope if scope is not None: scope.directives = env.directives @@ -3383,7 +3383,7 @@ class SingleAssignmentNode(AssignmentNode): if func_name in ['declare', 'typedef']: if len(args) > 2 or kwds is not None: - error(rhs.pos, "Can only declare one type at a time.") + error(self.rhs.pos, "Can only declare one type at a time.") return type = args[0].analyse_as_type(env) if type is None: @@ -3414,7 +3414,7 @@ class SingleAssignmentNode(AssignmentNode): elif func_name in ['struct', 'union']: self.declaration_only = True if len(args) > 0 or kwds is None: - error(rhs.pos, "Struct or union members must be given by name.") + error(self.rhs.pos, "Struct or union members must be given by name.") return members = [] for member, type_node in kwds.key_value_pairs: