Ruby: include/ruby/internal/intern/load.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

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
23#include "ruby/internal/attr/nonnull.h"
24#include "ruby/internal/dllexport.h"
25#include "ruby/internal/value.h"
26
27 RBIMPL_SYMBOL_EXPORT_BEGIN()
28
29/* load.c */
30
31
64void rb_load(VALUE path, int wrap);
65
90void rb_load_protect(VALUE path, int wrap, int *state);
91
92 RBIMPL_ATTR_NONNULL(())
101int rb_provided(const char *feature);
102
103 RBIMPL_ATTR_NONNULL((1))
114int rb_feature_provided(const char *feature, const char **loading);
115
116 RBIMPL_ATTR_NONNULL(())
125void rb_provide(const char *feature);
126
140 VALUE rb_f_require(VALUE self, VALUE feature);
141
177 VALUE rb_require_string(VALUE feature);
178
197void rb_ext_ractor_safe(bool flag);
198
200#define RB_EXT_RACTOR_SAFE(f) rb_ext_ractor_safe(f)
201
212#define HAVE_RB_EXT_RACTOR_SAFE 1
213
216 RBIMPL_SYMBOL_EXPORT_END()
217
218#endif /* RBIMPL_INTERN_LOAD_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
rb_provide
void rb_provide(const char *feature)
Declares that the given feature is already provided by someone else.
Definition load.c:685
rb_f_require
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:951
rb_ext_ractor_safe
void rb_ext_ractor_safe(bool flag)
Asserts that the extension library that calls this function is aware of Ractor.
Definition load.c:1152
rb_require_string
VALUE rb_require_string(VALUE feature)
Finds and loads the given feature, if absent.
Definition load.c:1307
rb_feature_provided
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:657
rb_load_protect
void rb_load_protect(VALUE path, int wrap, int *state)
Identical to rb_load(), except it avoids potential global escapes.
Definition load.c:786
rb_provided
int rb_provided(const char *feature)
Queries if the given feature has already been loaded into the execution context.
Definition load.c:624
rb_load
void rb_load(VALUE path, int wrap)
Loads and executes the Ruby program in the given file.
Definition load.c:778
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40