Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
#include "dln.h"
#include "eval_intern.h"
#include "internal.h"
#include "internal/dir.h"
#include "internal/error.h"
#include "internal/file.h"
#include "internal/load.h"
#include "internal/parse.h"
#include "internal/thread.h"
#include "internal/variable.h"
#include "iseq.h"
#include "probes.h"
#include "ruby/encoding.h"
#include "ruby/util.h"
Go to the source code of this file.
Data Structures | |
struct | loaded_feature_searching |
Macros | |
#define | IS_RBEXT(e) (strcmp((e), ".rb") == 0) |
#define | IS_SOEXT(e) (strcmp((e), ".so") == 0 || strcmp((e), ".o") == 0) |
#define | IS_DLEXT(e) (strcmp((e), DLEXT) == 0) |
Typedefs | |
typedef int(* | feature_func) (const char *feature, const char *ext, int rb, int expanded, const char **fn) |
Enumerations | |
enum | expand_type { EXPAND_ALL, EXPAND_RELATIVE, EXPAND_HOME, EXPAND_NON_CACHE } |
Functions | |
VALUE | rb_get_expanded_load_path (void) |
int | rb_provided (const char *feature) |
int | rb_feature_provided (const char *feature, const char **loading) |
void | rb_provide (const char *feature) |
void | rb_load (VALUE fname, int wrap) |
void | rb_load_protect (VALUE fname, int wrap, int *pstate) |
VALUE | rb_f_require (VALUE obj, VALUE fname) |
VALUE | rb_f_require_relative (VALUE obj, VALUE fname) |
VALUE | rb_resolve_feature_path (VALUE klass, VALUE fname) |
void | rb_ext_ractor_safe (bool flag) |
int | rb_require_internal (VALUE fname) |
int | ruby_require_internal (const char *fname, unsigned int len) |
VALUE | rb_require_string (VALUE fname) |
VALUE | rb_require (const char *fname) |
void | ruby_init_ext (const char *name, void(*init)(void)) |
void | Init_load (void) |
#define IS_SOEXT | ( | e | ) | (strcmp((e), ".so") == 0 || strcmp((e), ".o") == 0) |
enum expand_type |
void Init_load | ( | void | ) |
Definition at line 1323 of file load.c.
References GET_VM, ruby::backward::cxxanyargs::rb_define_hooked_variable(), and rb_intern2().
void rb_ext_ractor_safe | ( | bool | flag | ) |
Definition at line 1039 of file load.c.
References GET_THREAD.
Referenced by Init_bigdecimal(), Init_cparse(), Init_escape(), Init_generator(), Init_monitor(), Init_openssl(), Init_parser(), Init_pathname(), Init_socket(), Init_stringio(), Init_strscan(), and Init_zlib().
Definition at line 871 of file load.c.
References rb_require_string().
Definition at line 885 of file load.c.
References NIL_P, rb_current_realfilepath(), rb_file_absolute_path(), rb_file_dirname(), rb_loaderror(), and rb_require_string().
Definition at line 563 of file load.c.
References IS_RBEXT, Qnil, rb_file_expand_path_fast(), rb_get_path(), rb_str_new2, RSTRING_PTR, strchr(), and strrchr().
Referenced by rb_provided().
VALUE rb_get_expanded_load_path | ( | void | ) |
Definition at line 97 of file load.c.
References GET_VM, rb_vm_struct::load_path, rb_vm_struct::load_path_snapshot, Qtrue, and rb_ary_shared_with_p().
void rb_load | ( | VALUE | fname, |
int | wrap | ||
) |
Definition at line 693 of file load.c.
References FilePathValue, and rb_find_file().
Referenced by rb_load_protect().
void rb_load_protect | ( | VALUE | fname, |
int | wrap, | ||
int * | pstate | ||
) |
Definition at line 701 of file load.c.
References EC_EXEC_TAG, EC_POP_TAG, EC_PUSH_TAG, GET_EC, rb_load(), and TAG_NONE.
int rb_provided | ( | const char * | feature | ) |
Definition at line 557 of file load.c.
References rb_feature_provided().
Definition at line 1186 of file load.c.
References rb_require_string(), and rb_str_new_cstr.
Referenced by Init_generator(), Init_ossl_digest(), and Init_parser().
Definition at line 1170 of file load.c.
References GET_EC.
Referenced by rb_f_require(), rb_f_require_relative(), and rb_require().
Definition at line 1001 of file load.c.
References rb_get_path(), rb_str_encode_ospath(), and sym.
void ruby_init_ext | ( | const char * | name, |
void(*)(void) | init | ||
) |