def string_at(p, length=None): if isinstance(p, c_void_p): p = Pointer(p.value) if length: return p.getByteArray(0, length).tostring() return p.getString(0).encode('utf-8')
class c_char_p_p(object): _wrap = True _jffi_type = ctypes.c_void_p._jffi_type def __init__(self, value): self.value = Pointer(value) def __getitem__(self, idx): return string_at(self.value.getPointer(idx * Pointer.SIZE))
def __init__(self, value): self.value = Pointer(value)