CallBack function in C Libraries.
Mark H Harris
harrismh777 at gmail.com
Fri Mar 21 00:42:03 CET 2014
On 3/20/14 6:16 PM, fiensproto at gmail.com wrote:
> def TheProc(c_int): fpgui.fpgFormWindowTitle(0, 'Boum')
> return 0
> TheProcF = CMPFUNC(TheProc)
> Traceback (most recent call last): File "_ctypes/callbacks.c",
> line 314, in 'calling callback function' TypeError: TheProc() takes
> exactly 1 argument (0 given)
> What is wrong ?
You defined TheProc(c_init) to take exactly 1 argument.
But when you called it, you didn't provide the argument.
So, you got a traceback indicating that TheProc() takes exactly one
Give the function call its required argument and the error will go
away... well, at least that one.
More information about the Python-list