(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:
Thien-Thi Nguyen 2000-06-28 23:01:00 +00:00
commit 36a8a00dfa

View file

@ -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);
}
}
// -----------------------------------------------------------------------