File tree Expand file tree Collapse file tree 5 files changed +8
-11
lines changed
Expand file tree Collapse file tree 5 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,6 @@ struct symbol {
131131
132132#define SYMBOL_CONST 0x0001 /* symbol is const */
133133#define SYMBOL_CHECK 0x0008 /* used during dependency checking */
134- #define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */
135134#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */
136135#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
137136#define SYMBOL_WRITTEN 0x0800 /* track info to avoid double-write to .config */
Original file line number Diff line number Diff line change @@ -1070,7 +1070,7 @@ static gchar **fill_row(struct menu *menu)
10701070 row [COL_BTNVIS ] = GINT_TO_POINTER (FALSE);
10711071 return row ;
10721072 }
1073- if (sym -> flags & SYMBOL_CHOICEVAL )
1073+ if (sym_is_choice_value ( sym ) )
10741074 row [COL_BTNRAD ] = GINT_TO_POINTER (TRUE);
10751075
10761076 stype = sym_get_type (sym );
Original file line number Diff line number Diff line change @@ -128,10 +128,7 @@ static inline bool sym_is_choice(const struct symbol *sym)
128128 return sym -> name == NULL ;
129129}
130130
131- static inline bool sym_is_choice_value (const struct symbol * sym )
132- {
133- return sym -> flags & SYMBOL_CHOICEVAL ? true : false;
134- }
131+ bool sym_is_choice_value (const struct symbol * sym );
135132
136133static inline bool sym_has_value (const struct symbol * sym )
137134{
Original file line number Diff line number Diff line change @@ -467,11 +467,6 @@ static void _menu_finalize(struct menu *parent, bool inside_choice)
467467 sym -> dir_dep .expr = expr_alloc_or (sym -> dir_dep .expr , parent -> dep );
468468 }
469469 for (menu = parent -> list ; menu ; menu = menu -> next ) {
470- if (sym && sym_is_choice (sym ) &&
471- menu -> sym && !sym_is_choice_value (menu -> sym )) {
472- menu -> sym -> flags |= SYMBOL_CHOICEVAL ;
473- }
474-
475470 /*
476471 * This code serves two purposes:
477472 *
Original file line number Diff line number Diff line change @@ -871,6 +871,11 @@ bool sym_is_changeable(const struct symbol *sym)
871871 return !sym_is_choice (sym ) && sym -> visible > sym -> rev_dep .tri ;
872872}
873873
874+ bool sym_is_choice_value (const struct symbol * sym )
875+ {
876+ return !list_empty (& sym -> choice_link );
877+ }
878+
874879HASHTABLE_DEFINE (sym_hashtable , SYMBOL_HASHSIZE );
875880
876881struct symbol * sym_lookup (const char * name , int flags )
@@ -908,6 +913,7 @@ struct symbol *sym_lookup(const char *name, int flags)
908913 symbol -> type = S_UNKNOWN ;
909914 symbol -> flags = flags ;
910915 INIT_LIST_HEAD (& symbol -> menus );
916+ INIT_LIST_HEAD (& symbol -> choice_link );
911917
912918 hash_add (sym_hashtable , & symbol -> node , hash );
913919
You can’t perform that action at this time.
0 commit comments