diff options
Diffstat (limited to 'include/ruby/ruby.h')
| -rw-r--r-- | include/ruby/ruby.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index d3db2d07fa..ca794bcaeb 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -283,7 +283,7 @@ int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap); * Soooo this `#define errno` below seems like a noob mistake at first sight. * If you look at its actual implementation, the functions are just adding one * level of indirection. It doesn't make any sense sorry? But yes! @ko1 told - * @shyouhei that this is invevitable. + * @shyouhei that this is inevitable. * * The ultimate reason is because Ruby now has N:M threads implemented. * Threads of that sort change their context in user land. A function can be @@ -300,7 +300,7 @@ int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap); * ``` * * This function (if ran under our Ractor) could change its running thread at - * the `close` function. But the two `errno` invokations are different! Look + * the `close` function. But the two `errno` invocations are different! Look * how the source code above is compiled by clang 17 with `-O3` flag @ Linux: * * ``` @@ -426,6 +426,21 @@ __extension__({ \ # include "ruby/backward.h" #endif +#ifndef RUBY__ASAN_DEFAULT_OPTIONS +# define RUBY__ASAN_DEFAULT_OPTIONS +#endif + +#define RUBY_GLOBAL_SETUP \ + RUBY__ASAN_DEFAULT_OPTIONS \ + /* RUBY_GLOBAL_SETUP end */ + +#if defined(__wasm__) && !defined(__EMSCRIPTEN__) +int rb_wasm_rt_start(int (*)(int, char **), int, char **); +# define ruby_start_main rb_wasm_rt_start +#else +# define ruby_start_main(main, argc, argv) main(argc, argv) +#endif + RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_RUBY_H */ |
