--- ./Pyrex-0.9.origin/Pyrex/Compiler/Symtab.py 2003-10-04 02:41:39.000000000 +0200 +++ ./Pyrex-0.9.ok/Pyrex/Compiler/Symtab.py 2003-12-27 17:10:42.000000000 +0100 @@ -102,6 +102,7 @@ # sue_entries [Entry] Struct/union/enum entries # arg_entries [Entry] Function argument entries # var_entries [Entry] User-defined variable entries + # all_var_entries [Entry] User-defined variable entries, including inherited ones # pyfunc_entries [Entry] Python function entries # cfunc_entries [Entry] C function entries # c_class_entries [Entry] All extension type entries @@ -142,6 +143,7 @@ self.sue_entries = [] self.arg_entries = [] self.var_entries = [] + self.all_var_entries = [] self.pyfunc_entries = [] self.cfunc_entries = [] self.c_class_entries = [] @@ -542,6 +544,7 @@ else: entry.is_cglobal = 1 self.var_entries.append(entry) + self.all_var_entries.append(entry) return entry def declare_global(self, name, pos): @@ -748,6 +751,7 @@ cname, visibility, is_cdef) entry.init_to_none = type.is_pyobject self.var_entries.append(entry) + self.all_var_entries.append(entry) return entry def declare_global(self, name, pos): @@ -773,6 +777,7 @@ entry = self.declare(name, cname, type, pos) entry.is_variable = 1 self.var_entries.append(entry) + self.all_var_entries.append(entry) if type.is_pyobject: error(pos, "C struct/union member cannot be a Python object") @@ -874,6 +879,7 @@ entry.visibility = visibility entry.is_variable = 1 self.var_entries.append(entry) + self.all_var_entries.append(entry) if type.is_pyobject: self.has_pyobject_attrs = 1 if visibility not in ('private', 'public', 'readonly'): @@ -948,10 +954,11 @@ # to work with this type. def adapt(cname): return "%s.%s" % (Naming.obj_base_cname, base_entry.cname) - for base_entry in base_scope.var_entries: + for base_entry in base_scope.all_var_entries: entry = self.declare(base_entry.name, adapt(base_entry.cname), base_entry.type, None) entry.is_variable = 1 + self.all_var_entries.append(entry) for base_entry in base_scope.cfunc_entries: entry = self.add_cfunction(base_entry.name, base_entry.type, None, adapt(base_entry.cname), base_entry.visibility)