freeze version string

This commit is contained in:
Roza 2021-03-27 23:17:20 -04:00
parent 0e9252f5b0
commit 3a22a12076
2 changed files with 3 additions and 3 deletions

View file

@ -209,7 +209,9 @@ static void mriBindingInit() {
/* Load global constants */
rb_gv_set("MKXP", Qtrue);
rb_const_set(mod, rb_intern("VERSION"), rb_utf8_str_new_cstr(MACRO_STRINGIFY(MKXPZ_VERSION)));
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)

View file

@ -647,13 +647,11 @@ void FileSystem::openRead(OpenHandler &handler, const char *filename) {
throw Exception(Exception::NoFileError, "%s", filename);
}
// FIXME: This is slower than RGSS
void FileSystem::openReadRaw(SDL_RWops &ops, const char *filename,
bool freeOnClose) {
PHYSFS_File *handle = PHYSFS_openRead(normalize(filename, 0, 0).c_str());
// assert(handle);
if (!handle)
throw Exception(Exception::NoFileError, "%s", filename);