From: William F. <wsf...@us...> - 2005-03-28 19:42:40
|
Update of /cvsroot/swig/SWIG/Source/Swig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29566 Modified Files: typesys.c Log Message: Index: typesys.c =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Swig/typesys.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** typesys.c 7 Mar 2005 20:38:43 -0000 1.27 --- typesys.c 28 Mar 2005 19:42:31 -0000 1.28 *************** *** 508,512 **** typedef_resolve(Typetab *s, String *base) { Hash *ttab; ! SwigType *type; List *inherit; Typetab *parent; --- 508,512 ---- typedef_resolve(Typetab *s, String *base) { Hash *ttab; ! SwigType *type = 0; List *inherit; Typetab *parent; *************** *** 515,544 **** /* Printf(stdout,"Typetab %s : %s\n", Getattr(s,"name"), base); */ ! if (Getmark(s)) return 0; ! Setmark(s,1); ! ttab = Getattr(s,k_typetab); ! type = Getattr(ttab,base); ! if (type) { ! resolved_scope = s; ! Setmark(s,0); ! return type; ! } ! /* Hmmm. Not found in my scope. It could be in an inherited scope */ ! inherit = Getattr(s,k_inherit); ! if (inherit) { ! int i,len; ! len = Len(inherit); ! for (i = 0; i < len; i++) { ! type = typedef_resolve(Getitem(inherit,i), base); ! if (type) { ! Setmark(s,0); ! return type; } } } - parent = Getattr(s,k_parent); - type = parent ? typedef_resolve(parent, base) : 0; - Setmark(s,0); return type; } --- 515,547 ---- /* Printf(stdout,"Typetab %s : %s\n", Getattr(s,"name"), base); */ ! if (!Getmark(s)) { ! Setmark(s,1); ! ttab = Getattr(s,k_typetab); ! type = Getattr(ttab,base); ! if (type) { ! resolved_scope = s; ! Setmark(s,0); ! } else { ! /* Hmmm. Not found in my scope. It could be in an inherited scope */ ! inherit = Getattr(s,k_inherit); ! if (inherit) { ! int i,len; ! len = Len(inherit); ! for (i = 0; i < len; i++) { ! type = typedef_resolve(Getitem(inherit,i), base); ! if (type) { ! Setmark(s,0); ! break; ! } ! } ! } ! if (!type) { ! parent = Getattr(s,k_parent); ! type = parent ? typedef_resolve(parent, base) : 0; ! Setmark(s,0); } } } return type; } |