ruby: fix crash when unloading plugin on Windows

develop
lethosor 2017-05-09 13:49:07 -04:00
parent 8bda738466
commit 4dff218976
2 changed files with 4 additions and 3 deletions

@ -124,6 +124,7 @@ Fixes
- `modtools/item-trigger`: fixed errors with plant growths - `modtools/item-trigger`: fixed errors with plant growths
- `remotefortressreader`: fixed a crash when serializing the local map - `remotefortressreader`: fixed a crash when serializing the local map
- `ruby`: fixed a crash when unloading the plugin on Windows
- `title-version`: now hidden when loading an arena - `title-version`: now hidden when loading an arena
Misc Improvements Misc Improvements

@ -296,7 +296,7 @@ void (*ruby_sysinit)(int *, const char ***);
void (*ruby_init)(void); void (*ruby_init)(void);
void (*ruby_init_loadpath)(void); void (*ruby_init_loadpath)(void);
void (*ruby_script)(const char*); void (*ruby_script)(const char*);
void (*ruby_finalize)(void); int (*ruby_cleanup)(int);
ID (*rb_intern)(const char*); ID (*rb_intern)(const char*);
VALUE (*rb_funcall)(VALUE, ID, int, ...); VALUE (*rb_funcall)(VALUE, ID, int, ...);
VALUE (*rb_define_module)(const char*); VALUE (*rb_define_module)(const char*);
@ -351,7 +351,7 @@ static int df_loadruby(void)
rbloadsym(ruby_init); rbloadsym(ruby_init);
rbloadsym(ruby_init_loadpath); rbloadsym(ruby_init_loadpath);
rbloadsym(ruby_script); rbloadsym(ruby_script);
rbloadsym(ruby_finalize); rbloadsym(ruby_cleanup);
rbloadsym(rb_intern); rbloadsym(rb_intern);
rbloadsym(rb_funcall); rbloadsym(rb_funcall);
rbloadsym(rb_define_module); rbloadsym(rb_define_module);
@ -476,7 +476,7 @@ static void df_rubythread(void *p)
case RB_DIE: case RB_DIE:
running = 0; running = 0;
ruby_finalize(); ruby_cleanup(0);
break; break;
case RB_EVAL: case RB_EVAL: