diff options
Diffstat (limited to 'gdb/guile/scm-param.c')
-rw-r--r-- | gdb/guile/scm-param.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/guile/scm-param.c b/gdb/guile/scm-param.c index 53120cb..6d24c2c 100644 --- a/gdb/guile/scm-param.c +++ b/gdb/guile/scm-param.c @@ -31,7 +31,10 @@ union pascm_variable { - /* Hold an integer value, for boolean and integer types. */ + /* Hold an boolean value. */ + bool boolval; + + /* Hold an integer value. */ int intval; /* Hold an auto_boolean. */ @@ -365,7 +368,7 @@ add_setshow_generic (enum var_types param_type, enum command_class cmd_class, { case var_boolean: add_setshow_boolean_cmd (cmd_name, cmd_class, - &self->value.intval, + &self->value.boolval, set_doc, show_doc, help_doc, set_func, show_func, set_list, show_list); @@ -606,7 +609,7 @@ pascm_param_value (enum var_types type, void *var, case var_boolean: { - if (* (int *) var) + if (* (bool *) var) return SCM_BOOL_T; else return SCM_BOOL_F; @@ -717,7 +720,7 @@ pascm_set_param_value_x (enum var_types type, union pascm_variable *var, case var_boolean: SCM_ASSERT_TYPE (gdbscm_is_bool (value), value, arg_pos, func_name, _("boolean")); - var->intval = gdbscm_is_true (value); + var->boolval = gdbscm_is_true (value); break; case var_auto_boolean: |