From: Stefan Behnel Date: Thu, 9 Apr 2009 06:27:57 +0000 (+0200) Subject: fix some compiler errors X-Git-Tag: 0.12.alpha0~327^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=74dffa6fc48f3d82c924c505b641aba7399190bd;p=cython.git fix some compiler errors --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 12eed177..f4ba22cc 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2067,7 +2067,8 @@ class SliceIndexNode(ExprNode): array_length = rhs.type.size self.generate_slice_guard_code(code, array_length) else: - error("Slice assignments from pointers are not yet supported.") + error(self.pos, + "Slice assignments from pointers are not yet supported.") # FIXME: fix the array size according to start/stop array_length = self.base.type.size for i in range(array_length): @@ -2657,8 +2658,8 @@ class AttributeNode(NewTempExprNode): def compile_time_value(self, denv): attr = self.attribute if attr.startswith("__") and attr.endswith("__"): - self.error("Invalid attribute name '%s' in compile-time expression" - % attr) + error(self.pos, + "Invalid attribute name '%s' in compile-time expression" % attr) return None obj = self.obj.compile_time_value(denv) try: