Changeset c72f884


Ignore:
Timestamp:
May 12, 2011, 4:39:26 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
92fc397
Parents:
7fd0bf7
git-author:
David Benjamin <davidben@mit.edu> (05/07/11 15:21:11)
git-committer:
David Benjamin <davidben@mit.edu> (05/12/11 16:39:26)
Message:
owl_dict_get_keys never fails

No sense in returning an error code.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • dict.c

    r7fd0bf7 rc72f884  
    6060/* Appends dictionary keys to a list.  Duplicates the keys,
    6161 * so they will need to be freed by the caller. */
    62 int owl_dict_get_keys(const owl_dict *d, owl_list *l) {
     62void owl_dict_get_keys(const owl_dict *d, owl_list *l) {
    6363  int i;
    6464  for (i=0; i<d->size; i++) {
    6565    owl_list_append_element(l, g_strdup(d->els[i].k));
    6666  }
    67   return(0);
    6867}
    6968
  • global.c

    r55b2de8 rc72f884  
    747747}
    748748
    749 int owl_global_get_style_names(const owl_global *g, owl_list *l) {
    750   return owl_dict_get_keys(&(g->styledict), l);
     749void owl_global_get_style_names(const owl_global *g, owl_list *l) {
     750  owl_dict_get_keys(&(g->styledict), l);
    751751}
    752752
  • tester.c

    rf25df21 rc72f884  
    249249  FAIL_UNLESS("get_size", 3==owl_dict_get_size(&d));
    250250  owl_list_create(&l);
    251   FAIL_UNLESS("get_keys", 0==owl_dict_get_keys(&d, &l));
     251  owl_dict_get_keys(&d, &l);
    252252  FAIL_UNLESS("get_keys result size", 3==owl_list_get_size(&l));
    253253 
Note: See TracChangeset for help on using the changeset viewer.