diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-18 06:16:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-18 06:16:39 +0000 |
commit | e99ee55abcdbd3057f5ef7d4ef6692457815afaa (patch) | |
tree | 11045e400ee148e10afd1a8908da076cea4d1387 /variable.c | |
parent | a1660e97f574033cfe7df9e9cc629073af37969c (diff) | |
download | ruby-e99ee55abcdbd3057f5ef7d4ef6692457815afaa.tar.gz |
constify parameters
* include/ruby/intern.h: constify `argv` parameters.
* include/ruby/ruby.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/variable.c b/variable.c index 265633f40c..dac12aba9e 100644 --- a/variable.c +++ b/variable.c @@ -607,9 +607,9 @@ rb_define_variable(const char *name, VALUE *var) } void -rb_define_readonly_variable(const char *name, VALUE *var) +rb_define_readonly_variable(const char *name, const VALUE *var) { - rb_define_hooked_variable(name, var, 0, readonly_setter); + rb_define_hooked_variable(name, (VALUE *)var, 0, readonly_setter); } void @@ -653,7 +653,7 @@ rb_trace_eval(VALUE cmd, VALUE val) */ VALUE -rb_f_trace_var(int argc, VALUE *argv) +rb_f_trace_var(int argc, const VALUE *argv) { VALUE var, cmd; struct global_entry *entry; @@ -712,7 +712,7 @@ remove_trace(struct global_variable *var) */ VALUE -rb_f_untrace_var(int argc, VALUE *argv) +rb_f_untrace_var(int argc, const VALUE *argv) { VALUE var, cmd; ID id; @@ -2066,7 +2066,7 @@ rb_const_list(void *data) */ VALUE -rb_mod_constants(int argc, VALUE *argv, VALUE mod) +rb_mod_constants(int argc, const VALUE *argv, VALUE mod) { VALUE inherit; @@ -2240,7 +2240,7 @@ rb_define_global_const(const char *name, VALUE val) } static void -set_const_visibility(VALUE mod, int argc, VALUE *argv, rb_const_flag_t flag) +set_const_visibility(VALUE mod, int argc, const VALUE *argv, rb_const_flag_t flag) { int i; st_data_t v; @@ -2286,7 +2286,7 @@ set_const_visibility(VALUE mod, int argc, VALUE *argv, rb_const_flag_t flag) */ VALUE -rb_mod_private_constant(int argc, VALUE *argv, VALUE obj) +rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj) { set_const_visibility(obj, argc, argv, CONST_PRIVATE); return obj; @@ -2300,7 +2300,7 @@ rb_mod_private_constant(int argc, VALUE *argv, VALUE obj) */ VALUE -rb_mod_public_constant(int argc, VALUE *argv, VALUE obj) +rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj) { set_const_visibility(obj, argc, argv, CONST_PUBLIC); return obj; @@ -2526,7 +2526,7 @@ cvar_list(void *data) */ VALUE -rb_mod_class_variables(int argc, VALUE *argv, VALUE mod) +rb_mod_class_variables(int argc, const VALUE *argv, VALUE mod) { VALUE inherit; st_table *tbl; |