зеркало из https://github.com/github/ruby.git
[WASM] System initialization has no stack rewinding code to Asyncify
This commit is contained in:
Родитель
2d1e7dfc36
Коммит
d2033d0f06
28
main.c
28
main.c
|
@ -32,6 +32,19 @@
|
|||
|
||||
static int
|
||||
rb_main(int argc, char **argv)
|
||||
{
|
||||
RUBY_INIT_STACK;
|
||||
ruby_init();
|
||||
return ruby_run_node(ruby_options(argc, argv));
|
||||
}
|
||||
|
||||
#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
|
||||
int rb_wasm_rt_start(int (main)(int argc, char **argv), int argc, char **argv);
|
||||
#define rb_main(argc, argv) rb_wasm_rt_start(rb_main, argc, argv)
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
#ifdef RUBY_DEBUG_ENV
|
||||
ruby_set_debug_option(getenv("RUBY_DEBUG"));
|
||||
|
@ -41,20 +54,5 @@ rb_main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
ruby_sysinit(&argc, &argv);
|
||||
{
|
||||
RUBY_INIT_STACK;
|
||||
ruby_init();
|
||||
return ruby_run_node(ruby_options(argc, argv));
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
|
||||
int rb_wasm_rt_start(int (main)(int argc, char **argv), int argc, char **argv);
|
||||
return rb_wasm_rt_start(rb_main, argc, argv);
|
||||
#else
|
||||
return rb_main(argc, argv);
|
||||
#endif
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче