From add0b074b55e1e54e81e7327aa0abda2c8b75995 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Wed, 14 Apr 2010 14:14:11 -0300 Subject: [PATCH] quick fix for bug introduced in commit 3d7f9142d2f0 --- Cython/Compiler/PyrexTypes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index 4822c8f6..23dceaf6 100755 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -805,7 +805,7 @@ class CIntType(CNumericType): self.from_py_function = self.get_from_py_type_conversion() def get_to_py_type_conversion(self): - if self.rank < rank_to_type_name.index('int'): + if self.rank < list(rank_to_type_name).index('int'): # This assumes sizeof(short) < sizeof(int) return "PyInt_FromLong" else: @@ -816,7 +816,7 @@ class CIntType(CNumericType): if not self.signed: Prefix = "Long" SignWord = "Unsigned" - if self.rank == rank_to_type_name.index('PY_LONG_LONG'): + if self.rank >== list(rank_to_type_name).index('PY_LONG_LONG'): Prefix = "Long" TypeName = "LongLong" return "Py%s_From%s%s" % (Prefix, SignWord, TypeName) -- 2.26.2