myfuncFUNCTYPE = CFUNCTYPE(STRING)
myfunc.argtypes = [POINTER(c_char), callbackFUNCTYPE]

def mycb(result, userdata):
    userdata.append(result)
input = 'A large chunk of data.'
userdata = []
myfunc(input, myfuncFUNCTYPE(lambda x: mycb(x, userdata)))
Python objects as userdata in ctypes callback functions