mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-31 11:13:03 +02:00
Freeze System::CONFIG
This commit is contained in:
parent
88474d6eb6
commit
20878a4d70
1 changed files with 7 additions and 4 deletions
|
@ -246,9 +246,6 @@ static void mriBindingInit() {
|
|||
|
||||
/* Load global constants */
|
||||
rb_gv_set("MKXP", Qtrue);
|
||||
VALUE vers = rb_utf8_str_new_cstr(MACRO_STRINGIFY(MKXPZ_VERSION));
|
||||
rb_str_freeze(vers);
|
||||
rb_const_set(mod, rb_intern("VERSION"), vers);
|
||||
|
||||
VALUE debug = rb_bool_new(shState->config().editor.debug);
|
||||
if (rgssVer == 1)
|
||||
|
@ -258,7 +255,13 @@ static void mriBindingInit() {
|
|||
|
||||
rb_gv_set("BTEST", rb_bool_new(shState->config().editor.battleTest));
|
||||
|
||||
rb_define_const(mod, "CONFIG", json2rb(shState->config().raw));
|
||||
VALUE vers = rb_utf8_str_new_cstr(MACRO_STRINGIFY(MKXPZ_VERSION));
|
||||
rb_str_freeze(vers);
|
||||
rb_define_const(mod, "VERSION", vers);
|
||||
|
||||
VALUE cfg = json2rb(shState->config().raw);
|
||||
rb_hash_freeze(cfg);
|
||||
rb_define_const(mod, "CONFIG", cfg);
|
||||
|
||||
// Set $stdout and its ilk accordingly on Windows
|
||||
#ifdef __WIN32__
|
||||
|
|
Loading…
Add table
Reference in a new issue