(GUILE::create_function): Warn to stderr for and do not wrap
functions with more than ten arguments. Thanks to Matthias Koeppe. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@507 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
70f838b85c
commit
36a8a00dfa
1 changed files with 12 additions and 3 deletions
|
|
@ -620,9 +620,18 @@ GUILE::create_function (char *name, char *iname, DataType *d, ParmList *l)
|
|||
|
||||
f.print (f_wrappers);
|
||||
|
||||
// Now register the function
|
||||
fprintf (f_init, "\t gh_new_procedure(\"%s\", %s, %d, %d, 0);\n",
|
||||
proc_name.get(), wname, numargs-numopt, numopt);
|
||||
if (numargs > 10) {
|
||||
// Guile would complain: too many args
|
||||
fprintf(stderr,
|
||||
"%s : Line %d. Warning. Too many arguments in Guile wrapper "
|
||||
"for function %s (max. 10).\n",
|
||||
input_file, line_number, name);
|
||||
}
|
||||
else {
|
||||
// Now register the function
|
||||
fprintf (f_init, "\t gh_new_procedure(\"%s\", %s, %d, %d, 0);\n",
|
||||
proc_name.get(), wname, numargs-numopt, numopt);
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue