fix classLookup() to return consistent results when %ignore specified

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5697 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-02-03 21:19:19 +00:00
commit f451962c82

View file

@ -2209,7 +2209,7 @@ Language::classLookup(SwigType *s) {
/* Look in hash of cached values */ /* Look in hash of cached values */
n = Getattr(classtypes,s); n = Getattr(classtypes,s);
if (n) return n; if (!n) {
lt = SwigType_ltype(s); lt = SwigType_ltype(s);
ty1 = SwigType_typedef_resolve_all(lt); ty1 = SwigType_typedef_resolve_all(lt);
@ -2225,6 +2225,7 @@ Language::classLookup(SwigType *s) {
prefix = SwigType_prefix(ty2); prefix = SwigType_prefix(ty2);
/* Do a symbol table search on the base type */
while (!n) { while (!n) {
Hash *nstab; Hash *nstab;
n = Swig_symbol_clookup(base,stab); n = Swig_symbol_clookup(base,stab);
@ -2239,8 +2240,6 @@ Language::classLookup(SwigType *s) {
} }
stab = nstab; stab = nstab;
} }
/* Do a symbol table search on the base type */
/* n = Swig_symbol_clookup(base,0); */
if (n) { if (n) {
/* Found a match. Look at the prefix. We only allow /* Found a match. Look at the prefix. We only allow
a few cases: pointers, references, and simple */ a few cases: pointers, references, and simple */
@ -2256,7 +2255,11 @@ Language::classLookup(SwigType *s) {
Delete(base); Delete(base);
Delete(prefix); Delete(prefix);
if (n && (Getattr(n,"feature:ignore"))) return 0; }
if (n && (Getattr(n,"feature:ignore"))) {
n = 0;
}
return n; return n;
} }