API cleanup (Parms)

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2007-01-10 23:43:07 +00:00
commit b00cef436b
12 changed files with 94 additions and 78 deletions

View file

@ -81,20 +81,6 @@ ParmList *CopyParmList(ParmList *p) {
return CopyParmListMax(p,-1);
}
/* ------------------------------------------------------------------
* int ParmList_numarg()
* ------------------------------------------------------------------ */
int ParmList_numarg(ParmList *p) {
int n = 0;
while (p) {
if (!Getattr(p, "ignore"))
n++;
p = nextSibling(p);
}
return n;
}
/* -----------------------------------------------------------------------------
* int ParmList_numrequired(). Return number of required arguments
* ----------------------------------------------------------------------------- */
@ -181,17 +167,13 @@ String *ParmList_str_defaultargs(ParmList *p) {
String *ParmList_protostr(ParmList *p) {
String *out = NewStringEmpty();
while (p) {
if (Getattr(p, "hidden")) {
p = nextSibling(p);
} else {
String *pstr = SwigType_str(Getattr(p, "type"), 0);
Append(out, pstr);
p = nextSibling(p);
if (p) {
Append(out, ",");
}
Delete(pstr);
String *pstr = SwigType_str(Getattr(p, "type"), 0);
Append(out, pstr);
p = nextSibling(p);
if (p) {
Append(out, ",");
}
Delete(pstr);
}
return out;
}