Changeset ce68f23 for help.c


Ignore:
Timestamp:
Jun 25, 2011, 3:26:16 AM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
c266281
Parents:
3cdd6d2
git-author:
David Benjamin <davidben@mit.edu> (06/11/11 20:06:46)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:16)
Message:
Make owl_dict_get_keys return a GPtrArray

Almost all the remaining uses of owl_list are tightly coupled into this
one giant blob.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • help.c

    rf25df21 rce68f23  
    66  owl_fmtext fm;
    77  const char *varname;
    8   owl_list varnames;
    9   int i, numvarnames;
     8  GPtrArray *varnames;
     9  int i;
    1010
    1111  owl_fmtext_init_null(&fm);
     
    129129  owl_fmtext_append_bold(&fm,
    130130                         "Variables:\n");
    131   owl_list_create(&varnames);
    132   owl_variable_dict_get_names(owl_global_get_vardict(&g), &varnames);
    133   numvarnames = owl_list_get_size(&varnames);
    134   for (i=0; i<numvarnames; i++) {
    135     varname = owl_list_get_element(&varnames, i);
     131  varnames = owl_variable_dict_get_names(owl_global_get_vardict(&g));
     132  for (i = 0; i < varnames->len; i++) {
     133    varname = varnames->pdata[i];
    136134    if (varname && varname[0]!='_') {
    137135      owl_variable_describe(owl_global_get_vardict(&g), varname, &fm);
    138136    }
    139137  }
    140   owl_list_cleanup(&varnames, g_free);
     138  owl_ptr_array_free(varnames, g_free);
    141139
    142140  owl_fmtext_append_normal(&fm, "\n");
Note: See TracChangeset for help on using the changeset viewer.