def byref(cdata, offset=0): # "pointer" is imported at the end of this module to avoid circular # imports ptr = pointer(cdata) if offset != 0: ptr._buffer[0] += offset return ptr
def byref(cdata): # "pointer" is imported at the end of this module to avoid circular # imports return pointer(cdata)
def byref(cdata, offset=0): from _ctypes.pointer import pointer ptr = pointer(cdata) if offset != 0: ptr._buffer[0] += offset return ptr