@box(IndexType)
def box_index(typ, val, c):
 index = make_index(c.context, c.builder, typ, value=val)
 classobj = c.pyapi.unserialize(c.pyapi.serialize_object(typ.pyclass))
 arrayobj = c.box(typ.as_array, index.data)
 indexobj = c.pyapi.call_function_objargs(classobj, (arrayobj,))
 return indexobj

@ box ( IndexType ) def box_index ( typ , val , c ) : index = make_index ( c . context , c . builder , typ , value = val ) classobj = c . pyapi . unserialize ( c . pyapi . serialize_object ( typ . pyclass ) ) arrayobj = c . box ( typ . as_array , index . data ) indexobj = c . pyapi . call_function_objargs ( classobj , ( arrayobj , ) ) return indexobj
convert a native index structure to a index object .