def voidptr_output(func, argtypes, errcheck=True):
 func.argtypes = argtypes
 func.restype = c_void_p
 if errcheck:
  func.errcheck = check_pointer
 return func

def voidptr_output ( func , argtypes , errcheck = True ) : func . argtypes = argtypes func . restype = c_void_p if errcheck : func . errcheck = check_pointer return func
for functions that return c_void_p .