th40g27thbg29-nd[kjfg-3o0ng
This commit is contained in:
parent
8e2f21e1d4
commit
7cb65e3479
|
|
@ -249,15 +249,19 @@ static void processReset(){
|
||||||
false);
|
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_METHOD(mriRgssMain){
|
||||||
RB_UNUSED_PARAM;
|
RB_UNUSED_PARAM;
|
||||||
|
|
||||||
while (true){
|
while (true){
|
||||||
VALUE exc = Qnil;
|
VALUE exc = Qnil;
|
||||||
|
|
||||||
rb_rescue2((VALUE(*)(ANYARGS)) rgssMainCb, rb_block_proc(),
|
rb_rescue2(rgssMainCb_wrapper, rb_block_proc(),
|
||||||
(VALUE(*)(ANYARGS)) rgssMainRescue, (VALUE) &exc,
|
rgssMainRescue_wrapper, (VALUE)&exc,
|
||||||
rb_eException, (VALUE) 0);
|
rb_eException, (VALUE)0);
|
||||||
|
|
||||||
if (NIL_P(exc))
|
if (NIL_P(exc))
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -183,22 +183,22 @@ void fileIntBindingInit(){
|
||||||
VALUE klass = rb_define_class("FileInt", rb_cIO);
|
VALUE klass = rb_define_class("FileInt", rb_cIO);
|
||||||
rb_define_alloc_func(klass, classAllocate<&FileIntType>);
|
rb_define_alloc_func(klass, classAllocate<&FileIntType>);
|
||||||
|
|
||||||
_rb_define_method(klass, "read", fileIntRead);
|
rb_define_method(klass, "read", RUBY_METHOD_FUNC(fileIntRead), -1);
|
||||||
_rb_define_method(klass, "getbyte", fileIntGetByte);
|
rb_define_method(klass, "getbyte", RUBY_METHOD_FUNC(fileIntGetByte), 0);
|
||||||
_rb_define_method(klass, "binmode", fileIntBinmode);
|
rb_define_method(klass, "binmode", RUBY_METHOD_FUNC(fileIntBinmode), 0);
|
||||||
_rb_define_method(klass, "close", fileIntClose);
|
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, "load_data", RUBY_METHOD_FUNC(kernelLoadData), -1);
|
||||||
_rb_define_module_function(rb_mKernel, "save_data", kernelSaveData);
|
rb_define_module_function(rb_mKernel, "save_data", RUBY_METHOD_FUNC(kernelSaveData), -1);
|
||||||
|
|
||||||
/* We overload the built-in 'Marshal::load()' function to silently
|
/* We overload the built-in 'Marshal::load()' function to silently
|
||||||
* insert our utf8proc that ensures all read strings will be
|
* insert our utf8proc that ensures all read strings will be
|
||||||
* UTF-8 encoded */
|
* UTF-8 encoded */
|
||||||
VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
|
VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
|
||||||
if(marsh = Qnil){
|
if(marsh == Qnil){
|
||||||
printf("BrUh: cant get Marshal\n");
|
printf("BrUh: cant get Marshal\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
rb_define_alias(rb_singleton_class(marsh), "_mkxp_load_alias", "load");
|
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 New Issue