LPCconnector/LPCAppObject.py
changeset 46 c6b7d4c176c2
parent 44 a6577420a27b
child 47 f860aa7e90e5
equal deleted inserted replaced
45:786b12887e91 46:c6b7d4c176c2
    73                 idxstr = ctypes.string_at(
    73                 idxstr = ctypes.string_at(
    74                           ctypes.pointer(
    74                           ctypes.pointer(
    75                            ctypes.c_uint32(idx)),4)
    75                            ctypes.c_uint32(idx)),4)
    76                 if force !=None:
    76                 if force !=None:
    77                     c_type,unpack_func, pack_func = TypeTranslator.get(iectype, (None,None,None))
    77                     c_type,unpack_func, pack_func = TypeTranslator.get(iectype, (None,None,None))
    78                     forced_type_size = ctypes.sizeof(c_type)
    78                     forced_type_size = ctypes.sizeof(c_type) \
       
    79                         if iectype != "STRING" else len(force[-1])+1
    79                     forced_type_size_str = chr(forced_type_size)
    80                     forced_type_size_str = chr(forced_type_size)
    80                     forcestr = ctypes.string_at(
    81                     forcestr = ctypes.string_at(
    81                                 ctypes.pointer(
    82                                 ctypes.pointer(
    82                                  pack_func(c_type,force)),
    83                                  pack_func(c_type,force)),
    83                                  forced_type_size)
    84                                  forced_type_size)