From e24387031ff77a4b4db01c9bd6af8464ca5f13d8 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 9 Sep 2010 01:02:43 -0700 Subject: [PATCH] Fix slicing tests. --- Cython/Compiler/ExprNodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2