Changeset 636b137


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 PM (8 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, 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)
Message:
Add const qualifiers for owl_dict *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • dict.c

    re19eb97 r636b137  
    2424}
    2525
    26 int owl_dict_get_size(owl_dict *d) {
     26int owl_dict_get_size(const owl_dict *d) {
    2727  return(d->size);
    2828}
     
    3131 * this element would logically go, and stores the index in pos.
    3232 * Returns 1 if found, else 0. */
    33 int _owl_dict_find_pos(owl_dict *d, const char *k, int *pos) {
     33int _owl_dict_find_pos(const owl_dict *d, const char *k, int *pos) {
    3434  int lo = 0, hi = d->size;
    3535  while (lo < hi) {
     
    5050
    5151/* returns the value corresponding to key k */
    52 void *owl_dict_find_element(owl_dict *d, const char *k) {
     52void *owl_dict_find_element(const owl_dict *d, const char *k) {
    5353  int found, pos;
    5454  found = _owl_dict_find_pos(d, k, &pos);
     
    6161/* creates a list and fills it in with keys.  duplicates the keys,
    6262 * so they will need to be freed by the caller. */
    63 int owl_dict_get_keys(owl_dict *d, owl_list *l) {
     63int owl_dict_get_keys(const owl_dict *d, owl_list *l) {
    6464  int i;
    6565  char *dupk;
Note: See TracChangeset for help on using the changeset viewer.