Changeset 351c535


Ignore:
Timestamp:
May 20, 2011, 3:59:31 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
4c7c21f
Parents:
fda61d3
git-author:
David Benjamin <davidben@mit.edu> (05/07/11 15:21:11)
git-committer:
David Benjamin <davidben@mit.edu> (05/20/11 15:59:31)
Message:
owl_dict_get_keys never fails

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

Legend:

Unmodified
Added
Removed
  • dict.c

    rfda61d3 r351c535  
    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

    r3b8a563 r351c535  
    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 r351c535  
    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.