Commit 3f95f6c6 authored by Stefan Behnel's avatar Stefan Behnel

Fix Pythran declaration used for integer types: "long" isn't necessarily enough.

parent 91ee421e
...@@ -57,7 +57,7 @@ def pythran_indexing_type(type_, indices): ...@@ -57,7 +57,7 @@ def pythran_indexing_type(type_, indices):
n = 3 n = 3
return "pythonic::types::%s(%s)" % (func,",".join(["0"]*n)) return "pythonic::types::%s(%s)" % (func,",".join(["0"]*n))
elif idx.type.is_int: elif idx.type.is_int:
return "std::declval<long>()" return "std::declval<%s>()" % idx.type.sign_and_name()
elif idx.type.is_pythran_expr: elif idx.type.is_pythran_expr:
return "std::declval<%s>()" % idx.type.pythran_type return "std::declval<%s>()" % idx.type.pythran_type
raise ValueError("unsupported indice type %s!" % idx.type) raise ValueError("unsupported indice type %s!" % idx.type)
......
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