From: Robert Bradshaw Date: Fri, 12 Nov 2010 08:51:15 +0000 (-0800) Subject: Buffer fix. X-Git-Tag: 0.14.alpha0~178^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=62f3b3fb9a2fb1fe3d35c53d06a79d65d20d275c;p=cython.git Buffer fix. --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 23303655..0459938f 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2070,7 +2070,6 @@ class IndexNode(ExprNode): skip_child_analysis = False buffer_access = False if self.base.type.is_buffer: - assert hasattr(self.base, "entry") # Must be a NameNode-like node if self.indices: indices = self.indices else: @@ -2085,6 +2084,8 @@ class IndexNode(ExprNode): x.analyse_types(env) if not x.type.is_int: buffer_access = False + if buffer_access: + assert hasattr(self.base, "entry") # Must be a NameNode-like node # On cloning, indices is cloned. Otherwise, unpack index into indices assert not (buffer_access and isinstance(self.index, CloneNode))