Ruby 3.4.5p51 (2025-07-16 revision 20cda200d3ce092571d0b5d342dadca69636cb0f)
|
Tweaking visibility of C variables/functions. More...
Go to the source code of this file.
Macros | |
#define | RUBY_EXTERN extern |
Declaration of externally visible global variables. | |
#define | RBIMPL_SYMBOL_EXPORT_BEGIN() |
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {. | |
#define | RBIMPL_SYMBOL_EXPORT_END() |
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN. |
Tweaking visibility of C variables/functions.
Definition in file dllexport.h.
#define RBIMPL_SYMBOL_EXPORT_BEGIN | ( | ) |
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
@shyouhei finds it handy.
Definition at line 65 of file dllexport.h.
#define RBIMPL_SYMBOL_EXPORT_END | ( | ) |
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition at line 74 of file dllexport.h.
Referenced by rb_class_descendants(), rb_fd_select(), rb_fd_set(), rb_ivar_foreach(), rb_native_cond_destroy(), rb_num2ull(), and rb_proc_times().
#define RUBY_EXTERN extern |
Declaration of externally visible global variables.
Here "externally" means they should be visible from extension libraries. Depending on operating systems (dynamic linkers, to be precise), global variables inside of a DLL may or may not be visible form outside of that DLL by default. This declaration manually tweaks that default and ensures the declared variable be truly globally visible.
Definition at line 45 of file dllexport.h.
Referenced by rb_define_alloc_func(), and rb_random_mark().