mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
th40g27thbg29-nd[kjfg-3o0ng
This commit is contained in:
parent
8e2f21e1d4
commit
7cb65e3479
2 changed files with 15 additions and 11 deletions
|
|
@ -249,15 +249,19 @@ static void processReset(){
|
|||
false);
|
||||
}
|
||||
|
||||
static VALUE rgssMainCb_wrapper(VALUE data){ return rgssMainCb(data); }
|
||||
|
||||
static VALUE rgssMainRescue_wrapper(VALUE data, VALUE ex){ return rgssMainRescue(data, ex); }
|
||||
|
||||
RB_METHOD(mriRgssMain){
|
||||
RB_UNUSED_PARAM;
|
||||
|
||||
while (true){
|
||||
VALUE exc = Qnil;
|
||||
|
||||
rb_rescue2((VALUE(*)(ANYARGS)) rgssMainCb, rb_block_proc(),
|
||||
(VALUE(*)(ANYARGS)) rgssMainRescue, (VALUE) &exc,
|
||||
rb_eException, (VALUE) 0);
|
||||
rb_rescue2(rgssMainCb_wrapper, rb_block_proc(),
|
||||
rgssMainRescue_wrapper, (VALUE)&exc,
|
||||
rb_eException, (VALUE)0);
|
||||
|
||||
if (NIL_P(exc))
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -183,22 +183,22 @@ void fileIntBindingInit(){
|
|||
VALUE klass = rb_define_class("FileInt", rb_cIO);
|
||||
rb_define_alloc_func(klass, classAllocate<&FileIntType>);
|
||||
|
||||
_rb_define_method(klass, "read", fileIntRead);
|
||||
_rb_define_method(klass, "getbyte", fileIntGetByte);
|
||||
_rb_define_method(klass, "binmode", fileIntBinmode);
|
||||
_rb_define_method(klass, "close", fileIntClose);
|
||||
rb_define_method(klass, "read", RUBY_METHOD_FUNC(fileIntRead), -1);
|
||||
rb_define_method(klass, "getbyte", RUBY_METHOD_FUNC(fileIntGetByte), 0);
|
||||
rb_define_method(klass, "binmode", RUBY_METHOD_FUNC(fileIntBinmode), 0);
|
||||
rb_define_method(klass, "close", RUBY_METHOD_FUNC(fileIntClose), 0);
|
||||
|
||||
_rb_define_module_function(rb_mKernel, "load_data", kernelLoadData);
|
||||
_rb_define_module_function(rb_mKernel, "save_data", kernelSaveData);
|
||||
rb_define_module_function(rb_mKernel, "load_data", RUBY_METHOD_FUNC(kernelLoadData), -1);
|
||||
rb_define_module_function(rb_mKernel, "save_data", RUBY_METHOD_FUNC(kernelSaveData), -1);
|
||||
|
||||
/* We overload the built-in 'Marshal::load()' function to silently
|
||||
* insert our utf8proc that ensures all read strings will be
|
||||
* UTF-8 encoded */
|
||||
VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
|
||||
if(marsh = Qnil){
|
||||
if(marsh == Qnil){
|
||||
printf("BrUh: cant get Marshal\n");
|
||||
exit(1);
|
||||
}
|
||||
rb_define_alias(rb_singleton_class(marsh), "_mkxp_load_alias", "load");
|
||||
_rb_define_module_function(marsh, "load", _marshalLoad);
|
||||
rb_define_module_function(marsh, "load", RUBY_METHOD_FUNC(_marshalLoad), -1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue