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 {
131
131
132
132
#define SYMBOL_CONST 0x0001 /* symbol is const */
133
133
#define SYMBOL_CHECK 0x0008 /* used during dependency checking */
134
- #define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */
135
134
#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */
136
135
#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
137
136
#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)
1070
1070
row [COL_BTNVIS ] = GINT_TO_POINTER (FALSE);
1071
1071
return row ;
1072
1072
}
1073
- if (sym -> flags & SYMBOL_CHOICEVAL )
1073
+ if (sym_is_choice_value ( sym ) )
1074
1074
row [COL_BTNRAD ] = GINT_TO_POINTER (TRUE);
1075
1075
1076
1076
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)
128
128
return sym -> name == NULL ;
129
129
}
130
130
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 );
135
132
136
133
static inline bool sym_has_value (const struct symbol * sym )
137
134
{
Original file line number Diff line number Diff line change @@ -467,11 +467,6 @@ static void _menu_finalize(struct menu *parent, bool inside_choice)
467
467
sym -> dir_dep .expr = expr_alloc_or (sym -> dir_dep .expr , parent -> dep );
468
468
}
469
469
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
-
475
470
/*
476
471
* This code serves two purposes:
477
472
*
Original file line number Diff line number Diff line change @@ -871,6 +871,11 @@ bool sym_is_changeable(const struct symbol *sym)
871
871
return !sym_is_choice (sym ) && sym -> visible > sym -> rev_dep .tri ;
872
872
}
873
873
874
+ bool sym_is_choice_value (const struct symbol * sym )
875
+ {
876
+ return !list_empty (& sym -> choice_link );
877
+ }
878
+
874
879
HASHTABLE_DEFINE (sym_hashtable , SYMBOL_HASHSIZE );
875
880
876
881
struct symbol * sym_lookup (const char * name , int flags )
@@ -908,6 +913,7 @@ struct symbol *sym_lookup(const char *name, int flags)
908
913
symbol -> type = S_UNKNOWN ;
909
914
symbol -> flags = flags ;
910
915
INIT_LIST_HEAD (& symbol -> menus );
916
+ INIT_LIST_HEAD (& symbol -> choice_link );
911
917
912
918
hash_add (sym_hashtable , & symbol -> node , hash );
913
919
You can’t perform that action at this time.
0 commit comments