From: Robert Bradshaw Date: Thu, 9 Sep 2010 08:02:43 +0000 (-0700) Subject: Fix slicing tests. X-Git-Tag: 0.14.alpha0~333^2~1 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=e24387031ff77a4b4db01c9bd6af8464ca5f13d8;p=cython.git Fix slicing tests. --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 1ab47bf9..ddce6808 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2011,7 +2011,7 @@ class IndexNode(ExprNode): # Handle the case where base is a literal char* (and we expect a string, not an int) if isinstance(self.base, BytesNode) or is_slice: - if not (self.base.type.is_ptr or self.base.type.is_array): + if self.base.type.is_string or not (self.base.type.is_ptr or self.base.type.is_array): self.base = self.base.coerce_to_pyobject(env) skip_child_analysis = False