Changeset 3b9ca71 for variable.c


Ignore:
Timestamp:
Feb 19, 2013, 8:29:38 PM (12 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10
Children:
4584d1f
Parents:
69f74c2
git-author:
David Benjamin <davidben@mit.edu> (06/09/12 23:16:53)
git-committer:
David Benjamin <davidben@mit.edu> (02/19/13 20:29:38)
Message:
Allow perl variables to participate in argumentless set/unset
File:
1 edited

Legend:

Unmodified
Added
Removed
  • variable.c

    r69f74c2 r3b9ca71  
    619619    newvar = g_new0(owl_variable, 1);
    620620    newvar->type = init_params->type;
     621    newvar->takes_on_off = (newvar->type == OWL_VARIABLE_BOOL);
    621622    /* strdup all the strings so we can delete them consistently. */
    622623    newvar->name = g_strdup(init_params->name);
     
    680681}
    681682
    682 void owl_variable_dict_newvar_other(owl_vardict *vd, const char *name, const char *summary, const char *description, const char *validsettings, GClosure *get_tostring_fn, GClosure *set_fromstring_fn)
     683void owl_variable_dict_newvar_other(owl_vardict *vd, const char *name, const char *summary, const char *description, const char *validsettings, bool takes_on_off, GClosure *get_tostring_fn, GClosure *set_fromstring_fn)
    683684{
    684685  owl_variable *var = g_new0(owl_variable, 1);
     
    687688  var->description = g_strdup(description);
    688689  var->validsettings = g_strdup(validsettings);
     690  var->takes_on_off = takes_on_off;
    689691
    690692  var->get_tostring_fn = g_closure_ref(get_tostring_fn);
Note: See TracChangeset for help on using the changeset viewer.