/* A union that can hold anything described by enum var_types. */
union parmpy_variable
{
- /* Hold an integer value, for boolean and integer types. */
+ /* Hold a boolean value. */
+ bool boolval;
+
+ /* Hold an integer value. */
int intval;
/* Hold an auto_boolean. */
cmp = PyObject_IsTrue (value);
if (cmp < 0)
return -1;
- self->value.intval = cmp;
+ self->value.boolval = cmp;
break;
case var_auto_boolean:
case var_boolean:
add_setshow_boolean_cmd (cmd_name, cmdclass,
- &self->value.intval, set_doc, show_doc,
+ &self->value.boolval, set_doc, show_doc,
help_doc, get_set_value, get_show_value,
set_list, show_list);