Chicken: multiple_inheritance test now passes, and we correctly handle %ignored classes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7683 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
John Lenz 2005-10-19 06:27:56 +00:00
commit 036c081066
3 changed files with 39 additions and 9 deletions

View file

@ -1058,19 +1058,17 @@ CHICKEN::classHandler(Node *n)
if (!addSymbol(class_name,n)) return SWIG_ERROR;
/* Handle inheritance */
String *base_class = NewString("<");
String *base_class = NewString("");
List *baselist = Getattr(n,"bases");
if (baselist && Len(baselist)) {
Iterator base = First(baselist);
while (base.item) {
Printv(base_class, Getattr(base.item, "sym:name"),NIL);
base = Next(base);
if (base.item) {
Printf(base_class, "> <");
}
}
if (!Getattr(base.item, "feature:ignore"))
Printv(base_class, "<", Getattr(base.item, "sym:name"), "> ", NIL);
base = Next(base);
}
Printf(base_class, ">");
}
Replaceall(base_class, "_", "-");
String *scmmod = NewString(module);
@ -1080,7 +1078,7 @@ CHICKEN::classHandler(Node *n)
" (make <swig-metaclass-", scmmod, "> 'name \"", short_class_name, "\"\n", NIL);
Delete(scmmod);
if (Len(base_class) > 2) {
if (Len(base_class)) {
Printv(clos_class_defines," 'direct-supers (list ", base_class, ")\n", NIL);
} else {
Printv(clos_class_defines," 'direct-supers (list <object>)\n", NIL);