Handle more than 10 args.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@748 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2000-08-31 12:12:40 +00:00
commit dbd9b844a8
3 changed files with 45 additions and 5 deletions

View file

@ -259,6 +259,28 @@ void SWIG_Guile_RegisterTypes(_swig_type_info **table)
}
}
SWIGSTATIC void
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
int reqargs, int optargs,
const char *procname)
{
int i;
for (i = 0; i<reqargs; i++) {
if (!SCM_CONSP(rest))
scm_wrong_num_args(gh_str02scm(procname));
*dest++ = SCM_CAR(rest);
rest = SCM_CDR(rest);
}
for (i = 0; i<optargs && SCM_CONSP(rest); i++) {
*dest++ = SCM_CAR(rest);
rest = SCM_CDR(rest);
}
for (; i<optargs; i++)
*dest++ = GH_NOT_PASSED;
if (!SCM_NULLP(rest))
scm_wrong_num_args(gh_str02scm(procname));
}
#ifdef __cplusplus
}
#endif

View file

@ -93,6 +93,12 @@ SWIG_Guile_GetPtr (SCM s, void **result, _swig_type_info *type);
SWIGSTATIC SCM
SWIG_Guile_MakePtr (void *ptr, _swig_type_info *type);
/* Get arguments from an argument list */
SWIGSTATIC void
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
int reqargs, int optargs,
const char *procname);
#ifdef __cplusplus
}
#endif