- Timestamp:
- Jun 25, 2011, 3:26:16 AM (13 years ago)
- Branches:
- master, release-1.10, 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dict.c
r6829afc rce68f23 56 56 } 57 57 58 /* Appends dictionary keys to a list. Duplicates the keys, 59 * so they will need to be freed by the caller. */ 60 void owl_dict_get_keys(const owl_dict *d, owl_list *l) { 58 /* Returns a GPtrArray of dictionary keys. Duplicates the keys, so 59 * they will need to be freed by the caller with g_free. */ 60 CALLER_OWN GPtrArray *owl_dict_get_keys(const owl_dict *d) { 61 GPtrArray *keys = g_ptr_array_sized_new(d->size); 61 62 int i; 62 for (i =0; i<d->size; i++) {63 owl_list_append_element(l, g_strdup(d->els[i].k));63 for (i = 0; i < d->size; i++) { 64 g_ptr_array_add(keys, g_strdup(d->els[i].k)); 64 65 } 66 return keys; 65 67 } 66 68
Note: See TracChangeset
for help on using the changeset viewer.