Update mruby api.

This commit is contained in:
2026-02-01 17:01:57 +00:00
parent 154e557339
commit 8b49ab6085
11 changed files with 1161 additions and 862 deletions

View File

@@ -1,10 +1,10 @@
#include "main.h"
#include "scripting/decl.h"
mrb_value get_mode(mrb_state *mrb, mrb_value self) {
return mrb_fixnum_value(mode);
mrb_value get_config_file(mrb_state *mrb, mrb_value self) {
return mrb_str_new_cstr(mrb, ruby_config_path.string().c_str());
}
void setup_ruby_bindings(mrb_state *mrb, RClass *C_module) {
mrb_define_module_function(mrb, C_module, "mode", get_mode, MRB_ARGS_NONE());
mrb_define_module_function(mrb, C_module, "config_file", get_config_file,
MRB_ARGS_NONE());
}