Changeset e19eb97 for obarray.c


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 PM (12 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:
1077891a
Parents:
fa4562c
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:37:51)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
Message:
Add const qualifiers for char * and void *.

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

Legend:

Unmodified
Added
Removed
  • obarray.c

    rfa4562c re19eb97  
    1414 * the index it should be inserted at.
    1515 */
    16 int owl_obarray_lookup(owl_obarray *oa, char * key, char ** val) /*noproto*/
     16int owl_obarray_lookup(owl_obarray *oa, const char * key, const char ** val) /*noproto*/
    1717{
    1818  int first, last, mid;
    19   char * str;
     19  const char * str;
    2020  int cmp;
    2121
     
    4141
    4242/* Returns NULL if the string doesn't exist in the obarray */
    43 char * owl_obarray_find(owl_obarray *oa, char * string)
     43const char * owl_obarray_find(owl_obarray *oa, const char * string)
    4444{
    45   char *v;
     45  const char *v;
    4646  owl_obarray_lookup(oa, string, &v);
    4747  return v;
     
    4949
    5050/* Inserts the string into the obarray if it doesn't exist */
    51 char * owl_obarray_insert(owl_obarray *oa, char * string)
     51const char * owl_obarray_insert(owl_obarray *oa, const char * string)
    5252{
    53   char *v;
     53  const char *v;
    5454  int i;
    5555  i = owl_obarray_lookup(oa, string, &v);
     
    7777int owl_obarray_regtest(void) {
    7878  int numfailed = 0;
    79   char *p,*p2;
     79  const char *p,*p2;
    8080
    8181  owl_obarray oa;
Note: See TracChangeset for help on using the changeset viewer.