Commit 824d3450 authored by Takeshi Watanabe's avatar Takeshi Watanabe

Qualify argv argument of API `const`.

parent b20d711c
...@@ -184,7 +184,7 @@ void mrb_define_module_function(mrb_state*, struct RClass*, const char*, mrb_fun ...@@ -184,7 +184,7 @@ void mrb_define_module_function(mrb_state*, struct RClass*, const char*, mrb_fun
void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_value); void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_value);
void mrb_undef_method(mrb_state*, struct RClass*, const char*); void mrb_undef_method(mrb_state*, struct RClass*, const char*);
void mrb_undef_class_method(mrb_state*, struct RClass*, const char*); void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
mrb_value mrb_obj_new(mrb_state *mrb, struct RClass *c, int argc, mrb_value *argv); mrb_value mrb_obj_new(mrb_state *mrb, struct RClass *c, int argc, const mrb_value *argv);
#define mrb_class_new_instance(mrb,argc,argv,c) mrb_obj_new(mrb,c,argc,argv) #define mrb_class_new_instance(mrb,argc,argv,c) mrb_obj_new(mrb,c,argc,argv)
mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv); mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv);
struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super); struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super);
...@@ -243,8 +243,8 @@ int mrb_get_args(mrb_state *mrb, const char *format, ...); ...@@ -243,8 +243,8 @@ int mrb_get_args(mrb_state *mrb, const char *format, ...);
#define mrb_strlen_lit(lit) (sizeof(lit "") - 1) #define mrb_strlen_lit(lit) (sizeof(lit "") - 1)
mrb_value mrb_funcall(mrb_state*, mrb_value, const char*, int,...); mrb_value mrb_funcall(mrb_state*, mrb_value, const char*, int,...);
mrb_value mrb_funcall_argv(mrb_state*, mrb_value, mrb_sym, int, mrb_value*); mrb_value mrb_funcall_argv(mrb_state*, mrb_value, mrb_sym, int, const mrb_value*);
mrb_value mrb_funcall_with_block(mrb_state*, mrb_value, mrb_sym, int, mrb_value*, mrb_value); mrb_value mrb_funcall_with_block(mrb_state*, mrb_value, mrb_sym, int, const mrb_value*, mrb_value);
mrb_sym mrb_intern_cstr(mrb_state*,const char*); mrb_sym mrb_intern_cstr(mrb_state*,const char*);
mrb_sym mrb_intern(mrb_state*,const char*,size_t); mrb_sym mrb_intern(mrb_state*,const char*,size_t);
mrb_sym mrb_intern_static(mrb_state*,const char*,size_t); mrb_sym mrb_intern_static(mrb_state*,const char*,size_t);
...@@ -390,7 +390,7 @@ mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid); ...@@ -390,7 +390,7 @@ mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid);
mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c); mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c);
/* fiber functions (you need to link mruby-fiber mrbgem to use) */ /* fiber functions (you need to link mruby-fiber mrbgem to use) */
mrb_value mrb_fiber_yield(mrb_state *mrb, int argc, mrb_value *argv); mrb_value mrb_fiber_yield(mrb_state *mrb, int argc, const mrb_value *argv);
#define E_FIBER_ERROR (mrb_class_get(mrb, "FiberError")) #define E_FIBER_ERROR (mrb_class_get(mrb, "FiberError"))
/* memory pool implementation */ /* memory pool implementation */
......
...@@ -14,7 +14,7 @@ extern "C" { ...@@ -14,7 +14,7 @@ extern "C" {
void mrb_sys_fail(mrb_state *mrb, const char *mesg); void mrb_sys_fail(mrb_state *mrb, const char *mesg);
mrb_value mrb_exc_new_str(mrb_state *mrb, struct RClass* c, mrb_value str); mrb_value mrb_exc_new_str(mrb_state *mrb, struct RClass* c, mrb_value str);
#define mrb_exc_new_str_lit(mrb, c, lit) mrb_exc_new_str(mrb, c, mrb_str_new_lit(mrb, lit)) #define mrb_exc_new_str_lit(mrb, c, lit) mrb_exc_new_str(mrb, c, mrb_str_new_lit(mrb, lit))
mrb_value mrb_make_exception(mrb_state *mrb, int argc, mrb_value *argv); mrb_value mrb_make_exception(mrb_state *mrb, int argc, const mrb_value *argv);
mrb_value mrb_format(mrb_state *mrb, const char *format, ...); mrb_value mrb_format(mrb_state *mrb, const char *format, ...);
void mrb_exc_print(mrb_state *mrb, struct RObject *exc); void mrb_exc_print(mrb_state *mrb, struct RObject *exc);
void mrb_print_backtrace(mrb_state *mrb); void mrb_print_backtrace(mrb_state *mrb);
......
...@@ -259,7 +259,7 @@ fiber_transfer(mrb_state *mrb, mrb_value self) ...@@ -259,7 +259,7 @@ fiber_transfer(mrb_state *mrb, mrb_value self)
} }
mrb_value mrb_value
mrb_fiber_yield(mrb_state *mrb, int len, mrb_value *a) mrb_fiber_yield(mrb_state *mrb, int len, const mrb_value *a)
{ {
struct mrb_context *c = mrb->c; struct mrb_context *c = mrb->c;
mrb_callinfo *ci; mrb_callinfo *ci;
......
...@@ -1092,7 +1092,7 @@ mrb_instance_new(mrb_state *mrb, mrb_value cv) ...@@ -1092,7 +1092,7 @@ mrb_instance_new(mrb_state *mrb, mrb_value cv)
} }
mrb_value mrb_value
mrb_obj_new(mrb_state *mrb, struct RClass *c, int argc, mrb_value *argv) mrb_obj_new(mrb_state *mrb, struct RClass *c, int argc, const mrb_value *argv)
{ {
mrb_value obj; mrb_value obj;
......
...@@ -353,7 +353,7 @@ set_backtrace(mrb_state *mrb, mrb_value info, mrb_value bt) ...@@ -353,7 +353,7 @@ set_backtrace(mrb_state *mrb, mrb_value info, mrb_value bt)
} }
static mrb_value static mrb_value
make_exception(mrb_state *mrb, int argc, mrb_value *argv, mrb_bool isstr) make_exception(mrb_state *mrb, int argc, const mrb_value *argv, mrb_bool isstr)
{ {
mrb_value mesg; mrb_value mesg;
int n; int n;
...@@ -406,7 +406,7 @@ exception_call: ...@@ -406,7 +406,7 @@ exception_call:
} }
mrb_value mrb_value
mrb_make_exception(mrb_state *mrb, int argc, mrb_value *argv) mrb_make_exception(mrb_state *mrb, int argc, const mrb_value *argv)
{ {
return make_exception(mrb, argc, argv, TRUE); return make_exception(mrb, argc, argv, TRUE);
} }
......
...@@ -323,7 +323,7 @@ mrb_funcall(mrb_state *mrb, mrb_value self, const char *name, int argc, ...) ...@@ -323,7 +323,7 @@ mrb_funcall(mrb_state *mrb, mrb_value self, const char *name, int argc, ...)
} }
mrb_value mrb_value
mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mrb_value *argv, mrb_value blk) mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, const mrb_value *argv, mrb_value blk)
{ {
mrb_value val; mrb_value val;
...@@ -413,7 +413,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mr ...@@ -413,7 +413,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mr
} }
mrb_value mrb_value
mrb_funcall_argv(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mrb_value *argv) mrb_funcall_argv(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, const mrb_value *argv)
{ {
return mrb_funcall_with_block(mrb, self, mid, argc, argv, mrb_nil_value()); return mrb_funcall_with_block(mrb, self, mid, argc, argv, mrb_nil_value());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment