- Timestamp:
- Aug 15, 2009, 7:08:18 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- e5c9b14a
- Parents:
- 77bced3
- git-author:
- Anders Kaseorg <andersk@mit.edu> (08/04/09 00:32:46)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dict.c
re19eb97 r636b137 24 24 } 25 25 26 int owl_dict_get_size( owl_dict *d) {26 int owl_dict_get_size(const owl_dict *d) { 27 27 return(d->size); 28 28 } … … 31 31 * this element would logically go, and stores the index in pos. 32 32 * Returns 1 if found, else 0. */ 33 int _owl_dict_find_pos( owl_dict *d, const char *k, int *pos) {33 int _owl_dict_find_pos(const owl_dict *d, const char *k, int *pos) { 34 34 int lo = 0, hi = d->size; 35 35 while (lo < hi) { … … 50 50 51 51 /* returns the value corresponding to key k */ 52 void *owl_dict_find_element( owl_dict *d, const char *k) {52 void *owl_dict_find_element(const owl_dict *d, const char *k) { 53 53 int found, pos; 54 54 found = _owl_dict_find_pos(d, k, &pos); … … 61 61 /* creates a list and fills it in with keys. duplicates the keys, 62 62 * so they will need to be freed by the caller. */ 63 int owl_dict_get_keys( owl_dict *d, owl_list *l) {63 int owl_dict_get_keys(const owl_dict *d, owl_list *l) { 64 64 int i; 65 65 char *dupk;
Note: See TracChangeset
for help on using the changeset viewer.