Commit 95eec209 authored by Stefan Behnel's avatar Stefan Behnel

Minor speedup in compiled Pythran module.

parent 26ab50ad
# cython: language_level=3
from __future__ import absolute_import from __future__ import absolute_import
from .PyrexTypes import CType, CTypedefType, CStructOrUnionType from .PyrexTypes import CType, CTypedefType, CStructOrUnionType
...@@ -58,7 +60,7 @@ def pythran_unaryop_type(op, type_): ...@@ -58,7 +60,7 @@ def pythran_unaryop_type(op, type_):
op, pythran_type(type_)) op, pythran_type(type_))
@cython.ccall @cython.cfunc
def _index_access(index_code, indices): def _index_access(index_code, indices):
indexing = ",".join([index_code(idx) for idx in indices]) indexing = ",".join([index_code(idx) for idx in indices])
return ('[%s]' if len(indices) == 1 else '(%s)') % indexing return ('[%s]' if len(indices) == 1 else '(%s)') % indexing
......
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