mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 18:20:30 +01:00
Allow duplicate symbols at the same scope that are in different name spaces
This commit is contained in:
parent
d00b7958c0
commit
44bb1a62f9
1 changed files with 9 additions and 3 deletions
|
|
@ -347,10 +347,16 @@ _mesa_symbol_table_add_symbol(struct _mesa_symbol_table *table,
|
|||
|
||||
check_symbol_table(table);
|
||||
|
||||
/* If the symbol already exists at this scope, it cannot be added to the
|
||||
* table.
|
||||
/* If the symbol already exists in this namespace at this scope, it cannot
|
||||
* be added to the table.
|
||||
*/
|
||||
if (hdr->symbols && (hdr->symbols->depth == table->depth))
|
||||
for (sym = hdr->symbols
|
||||
; (sym != NULL) && (sym->name_space != name_space)
|
||||
; sym = sym->next_with_same_name) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
if (sym && (sym->depth == table->depth))
|
||||
return -1;
|
||||
|
||||
sym = calloc(1, sizeof(*sym));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue