*** empty log message ***

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7101 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-03-28 19:43:55 +00:00
commit 39d934c23d
2 changed files with 30 additions and 23 deletions

View file

@ -1,6 +1,10 @@
Version 1.3.25 (In progress) Version 1.3.25 (In progress)
============================ ============================
03/22/2005: wsfulton
Enum casting fixes. Visual C++ didn't like the C type casting SWIG produced
when wrapping C++ enum references, as reported by Admire Kandawasvika.
03/21/2005: wsfulton 03/21/2005: wsfulton
[Perl] SF #1124490. Fix Perl macro clashes when using Visual Studio's STL string, [Perl] SF #1124490. Fix Perl macro clashes when using Visual Studio's STL string,
so now projects can #include <string>. so now projects can #include <string>.

View file

@ -507,39 +507,42 @@ static Typetab *resolved_scope = 0;
static SwigType * static SwigType *
typedef_resolve(Typetab *s, String *base) { typedef_resolve(Typetab *s, String *base) {
Hash *ttab; Hash *ttab;
SwigType *type; SwigType *type = 0;
List *inherit; List *inherit;
Typetab *parent; Typetab *parent;
/* if (!s) return 0; *//* now is checked bellow */ /* if (!s) return 0; *//* now is checked bellow */
/* Printf(stdout,"Typetab %s : %s\n", Getattr(s,"name"), base); */ /* Printf(stdout,"Typetab %s : %s\n", Getattr(s,"name"), base); */
if (Getmark(s)) return 0; if (!Getmark(s)) {
Setmark(s,1); Setmark(s,1);
ttab = Getattr(s,k_typetab); ttab = Getattr(s,k_typetab);
type = Getattr(ttab,base); type = Getattr(ttab,base);
if (type) { if (type) {
resolved_scope = s; resolved_scope = s;
Setmark(s,0); Setmark(s,0);
return type; } else {
} /* Hmmm. Not found in my scope. It could be in an inherited scope */
/* Hmmm. Not found in my scope. It could be in an inherited scope */ inherit = Getattr(s,k_inherit);
inherit = Getattr(s,k_inherit); if (inherit) {
if (inherit) { int i,len;
int i,len; len = Len(inherit);
len = Len(inherit); for (i = 0; i < len; i++) {
for (i = 0; i < len; i++) { type = typedef_resolve(Getitem(inherit,i), base);
type = typedef_resolve(Getitem(inherit,i), base); if (type) {
if (type) { Setmark(s,0);
Setmark(s,0); break;
return type; }
}
}
if (!type) {
parent = Getattr(s,k_parent);
type = parent ? typedef_resolve(parent, base) : 0;
Setmark(s,0);
} }
} }
} }
parent = Getattr(s,k_parent);
type = parent ? typedef_resolve(parent, base) : 0;
Setmark(s,0);
return type; return type;
} }