Changeset 8742840 for stubgen.pl


Ignore:
Timestamp:
Aug 15, 2009, 7:08:21 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:
369a7f0
Parents:
6249e137
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:38:16)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:21)
Message:
Add const qualifiers for owl_global *.

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

Legend:

Unmodified
Added
Removed
  • stubgen.pl

    re19eb97 r8742840  
    2525        print "void owl_global_set_${altvarname}_off(owl_global *g) {\n";
    2626        print "  owl_variable_set_bool_off(&g->vars, \"$varname\");\n}\n";
    27         print "int owl_global_is_$altvarname(owl_global *g) {\n";
     27        print "int owl_global_is_$altvarname(const owl_global *g) {\n";
    2828        print "  return owl_variable_get_bool(&g->vars, \"$varname\");\n}\n";
    2929    } elsif ($vartype =~ /^PATH/ or $vartype =~ /^STRING/) {
    3030        print "void owl_global_set_$altvarname(owl_global *g, const char *text) {\n";
    3131        print "  owl_variable_set_string(&g->vars, \"$varname\", text);\n}\n";
    32         print "const char *owl_global_get_$altvarname(owl_global *g) {\n";
     32        print "const char *owl_global_get_$altvarname(const owl_global *g) {\n";
    3333        print "  return owl_variable_get_string(&g->vars, \"$varname\");\n}\n";
    3434    } elsif ($vartype =~ /^INT/ or $vartype =~ /^ENUM/) {
    3535        print "void owl_global_set_$altvarname(owl_global *g, int n) {\n";
    3636        print "  owl_variable_set_int(&g->vars, \"$varname\", n);\n}\n";
    37         print "int owl_global_get_$altvarname(owl_global *g) {\n";
     37        print "int owl_global_get_$altvarname(const owl_global *g) {\n";
    3838        print "  return owl_variable_get_int(&g->vars, \"$varname\");\n}\n";
    3939    }
Note: See TracChangeset for help on using the changeset viewer.