comparison lib-src/ebrowse.c @ 65626:69a9e146ef35

(add_sym): Compare namespace names instead of namespace objects. This prevents the parser from incorrectly treating classes whose superclass is in another namespace.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 20 Sep 2005 13:19:29 +0000
parents 6358e3c6075c
children 3661e9b3c48f ee12d75eb214
comparison
equal deleted inserted replaced
65625:348c05075334 65626:69a9e146ef35
646 for (s = name, h = 0; *s; ++s) 646 for (s = name, h = 0; *s; ++s)
647 h = (h << 1) ^ *s; 647 h = (h << 1) ^ *s;
648 h %= TABLE_SIZE; 648 h %= TABLE_SIZE;
649 649
650 for (sym = class_table[h]; sym; sym = sym->next) 650 for (sym = class_table[h]; sym; sym = sym->next)
651 if (streq (name, sym->name) && sym->namesp == scope) 651 if (streq (name, sym->name)
652 && ((!sym->namesp && !scope)
653 || (sym->namesp && scope
654 && streq (sym->namesp->name, scope->name))))
652 break; 655 break;
653 656
654 if (sym == NULL) 657 if (sym == NULL)
655 { 658 {
656 if (f_very_verbose) 659 if (f_very_verbose)