fix some compiler errors
authorStefan Behnel <scoder@users.berlios.de>
Thu, 9 Apr 2009 06:27:57 +0000 (08:27 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 9 Apr 2009 06:27:57 +0000 (08:27 +0200)
Cython/Compiler/ExprNodes.py

index 12eed177d6e4087ce2f48f960773bb7faa67d19a..f4ba22cc576516e6cb5ca2c2b7d7d59515dd7111 100644 (file)
@@ -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: