Ruby  3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
load.h
Go to the documentation of this file.
1 #ifndef RBIMPL_INTERN_LOAD_H /*-*-C++-*-vi:se ft=cpp:*/
2 #define RBIMPL_INTERN_LOAD_H
25 #include "ruby/internal/value.h"
26 
28 
29 /* load.c */
30 
31 
64 void rb_load(VALUE path, int wrap);
65 
90 void rb_load_protect(VALUE path, int wrap, int *state);
91 
101 int rb_provided(const char *feature);
102 
114 int rb_feature_provided(const char *feature, const char **loading);
115 
125 void rb_provide(const char *feature);
126 
140 VALUE rb_f_require(VALUE self, VALUE feature);
141 
177 VALUE rb_require_string(VALUE feature);
178 
190 void *rb_ext_resolve_symbol(const char *feature, const char *symbol);
191 
214 #define HAVE_RB_EXT_RESOLVE_SYMBOL 1
215 
234 void rb_ext_ractor_safe(bool flag);
235 
237 #define RB_EXT_RACTOR_SAFE(f) rb_ext_ractor_safe(f)
238 
249 #define HAVE_RB_EXT_RACTOR_SAFE 1
250 
254 
255 #endif /* RBIMPL_INTERN_LOAD_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:74
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:65
void * rb_ext_resolve_symbol(const char *feature, const char *symbol)
Resolves and returns a symbol of a function in the native extension specified by the feature and symb...
Definition: load.c:1584
void rb_provide(const char *feature)
Declares that the given feature is already provided by someone else.
Definition: load.c:715
VALUE rb_f_require(VALUE self, VALUE feature)
Identical to rb_require_string(), except it ignores the first argument for no reason.
Definition: load.c:1027
void rb_ext_ractor_safe(bool flag)
Asserts that the extension library that calls this function is aware of Ractor.
Definition: load.c:1228
VALUE rb_require_string(VALUE feature)
Finds and loads the given feature, if absent.
Definition: load.c:1385
int rb_feature_provided(const char *feature, const char **loading)
Identical to rb_provided(), except it additionally returns the "canonical" name of the loaded feature...
Definition: load.c:687
void rb_load_protect(VALUE path, int wrap, int *state)
Identical to rb_load(), except it avoids potential global escapes.
Definition: load.c:864
int rb_provided(const char *feature)
Queries if the given feature has already been loaded into the execution context.
Definition: load.c:654
void rb_load(VALUE path, int wrap)
Loads and executes the Ruby program in the given file.
Definition: load.c:856
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition: nonnull.h:27
Defines VALUE and ID.
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40