targets/typemapping.py
changeset 1747 6046ffa2280f
parent 1742 92932cd370a4
child 1748 ba5f64fe0e00
equal deleted inserted replaced
1746:45d6f5fba016 1747:6046ffa2280f
   100     for iectype in indexes:
   100     for iectype in indexes:
   101         c_type, unpack_func, pack_func = \
   101         c_type, unpack_func, pack_func = \
   102             TypeTranslator.get(iectype,
   102             TypeTranslator.get(iectype,
   103                                     (None, None, None))
   103                                     (None, None, None))
   104         if c_type is not None and buffoffset < buffsize:
   104         if c_type is not None and buffoffset < buffsize:
   105             cursor = c_void_p( buffptr + buffoffset)
   105             cursor = c_void_p(buffptr + buffoffset)
   106             value = unpack_func( cast(cursor,
   106             value = unpack_func(cast(cursor,
   107                          POINTER(c_type)).contents)
   107                          POINTER(c_type)).contents)
   108             buffoffset += sizeof(c_type) if iectype != "STRING" else len(value)+1
   108             buffoffset += sizeof(c_type) if iectype != "STRING" else len(value)+1
   109             res.append(value)
   109             res.append(value)
   110         else:
   110         else:
   111             break
   111             break