Changeset e5c9b14a


Ignore:
Timestamp:
Aug 15, 2009, 7:08:19 PM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
ff7e289
Parents:
636b137
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 00:34:17)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:19)
Message:
Add const qualifiers for owl_vardict *.

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

Legend:

Unmodified
Added
Removed
  • variable.c

    r64735f0 re5c9b14a  
    614614
    615615/* free the list with owl_variable_dict_namelist_free */
    616 void owl_variable_dict_get_names(owl_vardict *d, owl_list *l) {
     616void owl_variable_dict_get_names(const owl_vardict *d, owl_list *l) {
    617617  owl_dict_get_keys(d, l);
    618618}
     
    702702}
    703703
    704 int owl_variable_get_tostring(owl_vardict *d, const char *name, char *buf, int bufsize) {
     704int owl_variable_get_tostring(const owl_vardict *d, const char *name, char *buf, int bufsize) {
    705705  owl_variable *v;
    706706  if (!name) return(-1);
     
    710710}
    711711
    712 int owl_variable_get_default_tostring(owl_vardict *d, const char *name, char *buf, int bufsize) {
     712int owl_variable_get_default_tostring(const owl_vardict *d, const char *name, char *buf, int bufsize) {
    713713  owl_variable *v;
    714714  if (!name) return(-1);
     
    722722}
    723723
    724 owl_variable *owl_variable_get_var(owl_vardict *d, const char *name, int require_type) {
     724owl_variable *owl_variable_get_var(const owl_vardict *d, const char *name, int require_type) {
    725725  owl_variable *v;
    726726  if (!name) return(NULL);
     
    731731
    732732/* returns a reference */
    733 const void *owl_variable_get(owl_vardict *d, const char *name, int require_type) {
     733const void *owl_variable_get(const owl_vardict *d, const char *name, int require_type) {
    734734  owl_variable *v = owl_variable_get_var(d, name, require_type);
    735735  if(v == NULL) return NULL;
     
    738738
    739739/* returns a reference */
    740 const char *owl_variable_get_string(owl_vardict *d, const char *name) {
     740const char *owl_variable_get_string(const owl_vardict *d, const char *name) {
    741741  return owl_variable_get(d,name, OWL_VARIABLE_STRING);
    742742}
    743743
    744744/* returns a reference */
    745 const void *owl_variable_get_other(owl_vardict *d, const char *name) {
     745const void *owl_variable_get_other(const owl_vardict *d, const char *name) {
    746746  return owl_variable_get(d,name, OWL_VARIABLE_OTHER);
    747747}
    748748
    749 int owl_variable_get_int(owl_vardict *d, const char *name) {
     749int owl_variable_get_int(const owl_vardict *d, const char *name) {
    750750  const int *pi;
    751751  pi = owl_variable_get(d,name,OWL_VARIABLE_INT);
     
    754754}
    755755
    756 int owl_variable_get_bool(owl_vardict *d, const char *name) {
     756int owl_variable_get_bool(const owl_vardict *d, const char *name) {
    757757  const int *pi;
    758758  pi = owl_variable_get(d,name,OWL_VARIABLE_BOOL);
     
    761761}
    762762
    763 void owl_variable_describe(owl_vardict *d, const char *name, owl_fmtext *fm) {
     763void owl_variable_describe(const owl_vardict *d, const char *name, owl_fmtext *fm) {
    764764  char defaultbuf[50];
    765765  char buf[1024];
     
    785785}
    786786
    787 void owl_variable_get_help(owl_vardict *d, const char *name, owl_fmtext *fm) {
     787void owl_variable_get_help(const owl_vardict *d, const char *name, owl_fmtext *fm) {
    788788  char buff[1024];
    789789  int bufflen = 1023;
Note: See TracChangeset for help on using the changeset viewer.