mruby-method: add const modifier to struct RProc*

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-11-24 09:41:26 +09:00
parent 9da0c7e1a4
commit b52870b4c6
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
// Defined by mruby-proc-ext on which mruby-method depends
mrb_value mrb_proc_parameters(mrb_state *mrb, mrb_value proc);
mrb_value mrb_proc_source_location(mrb_state *mrb, struct RProc *p);
mrb_value mrb_proc_source_location(mrb_state *mrb, const struct RProc *p);
static mrb_value
args_shift(mrb_state *mrb)
@@ -4,7 +4,7 @@
#include <mruby/variable.h>
/* provided by mruby-proc-ext */
mrb_value mrb_proc_source_location(mrb_state *mrb, struct RProc *p);
mrb_value mrb_proc_source_location(mrb_state *mrb, const struct RProc *p);
/* provided by mruby-binding */
mrb_value mrb_binding_new(mrb_state *mrb, const struct RProc *proc, mrb_value recv, struct REnv *env);
+1 -1
View File
@@ -14,7 +14,7 @@ proc_lambda_p(mrb_state *mrb, mrb_value self)
}
mrb_value
mrb_proc_source_location(mrb_state *mrb, struct RProc *p)
mrb_proc_source_location(mrb_state *mrb, const struct RProc *p)
{
if (MRB_PROC_CFUNC_P(p)) {
return mrb_nil_value();