Changeset ca54fd6 for help.c


Ignore:
Timestamp:
Jul 3, 2011, 8:42:55 PM (10 years ago)
Author:
Jason Gross <jgross@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
ca749a9
Parents:
bc1d648
git-author:
Jason Gross <jgross@mit.edu> (06/27/11 01:14:13)
git-committer:
Jason Gross <jgross@mit.edu> (07/03/11 20:42:55)
Message:
Pass owl_variable * around instead of owl_vardict *.

This allows (forces) functions to do their own NULL- and type- checking
on variables.  The functions in varsubs.c get less checking, but if
these auto-generated functions are failing, something more serious is
probably wrong.

The owl_variable_get_* functions type-check their arguments, and
owl_function_error if the argument is the wrong type (it's a programmer
error and we should make some noise).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • help.c

    rce68f23 rca54fd6  
    44void owl_help(void)
    55{
     6  const owl_variable *v;
    67  owl_fmtext fm;
    78  const char *varname;
     
    133134    varname = varnames->pdata[i];
    134135    if (varname && varname[0]!='_') {
    135       owl_variable_describe(owl_global_get_vardict(&g), varname, &fm);
     136      v = owl_variable_get_var(owl_global_get_vardict(&g), varname);
     137      owl_variable_describe(v, &fm);
    136138    }
    137139  }
Note: See TracChangeset for help on using the changeset viewer.