Commit add0b074 authored by Lisandro Dalcin's avatar Lisandro Dalcin

quick fix for bug introduced in commit 3d7f9142d2f0

parent 0844f356
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment