From: Lisandro Dalcin Date: Wed, 14 Apr 2010 17:14:11 +0000 (-0300) Subject: quick fix for bug introduced in commit 3d7f9142d2f0 X-Git-Tag: 0.13.beta0~212 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=add0b074b55e1e54e81e7327aa0abda2c8b75995;p=cython.git quick fix for bug introduced in commit 3d7f9142d2f0 --- 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)