[Pythonmac-SIG] calldll MAXARGS
Georges Martin
georges.martin@deboeck.be
Thu, 25 Nov 1999 11:49:46 +0100
I am currently trying to use calldll, but I ran into an annoying limitation:
calldll.newcall() only accepts 8 arguments for the C function.
I looked into the source and found the MAXARG constant in calldll.c, line 66:
> /* Other constants */
> #define MAXNAME 31 /* Maximum size of names, for printing only */
> #define MAXARG 8 /* Maximum number of arguments */
I changed this constant and the following format and args at line 1073:
> /* Note: the next format depends on MAXARG */
> if (!PyArg_ParseTuple(args, "O!O&|O&O&O&O&O&O&O&O&", &Cdrtype, &routine,
> argparse_rvconv, &rvconv,
> argparse_conv, &argconv[0], argparse_conv, &argconv[1],
> argparse_conv, &argconv[2], argparse_conv, &argconv[3],
> argparse_conv, &argconv[4], argparse_conv, &argconv[5],
> argparse_conv, &argconv[6], argparse_conv, &argconv[7]))
> return NULL;
...and recompiled but the result is crashing hard.
I suppose it's not enough but C has never been one of my natural language, so if
someone has a suggestion... :-)
TIA,
Georges Martin
--
Georges Martin <mailto:georges.martin@deboeck.be>