|
Ruby
2.5.0dev(2017-10-22revision60238)
|
#include "internal.h"#include "ruby/util.h"#include "dln.h"#include "eval_intern.h"#include "probes.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) |
| #define | rb_intern(str) rb_intern2((str), strlen(str)) |
Enumerations | |
| enum | expand_type { EXPAND_ALL, EXPAND_RELATIVE, EXPAND_HOME, EXPAND_NON_CACHE } |
Functions | |
| VALUE | rb_get_load_path (void) |
| 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) |
| NORETURN (static void load_failed(VALUE)) | |
| const rb_iseq_t * | rb_iseq_load_iseq (VALUE fname) |
| 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) |
| int | rb_require_internal (VALUE fname, int safe) |
| int | ruby_require_internal (const char *fname, unsigned int len) |
| VALUE | rb_require_safe (VALUE fname, int safe) |
| VALUE | rb_require (const char *fname) |
| RUBY_FUNC_EXPORTED void | ruby_init_ext (const char *name, void(*init)(void)) |
| void | Init_load (void) |
Variables | |
| VALUE | rb_mWarning |
| #define IS_RBEXT | ( | e | ) | (strcmp((e), ".rb") == 0) |
Definition at line 13 of file load.c.
Referenced by rb_feature_provided().
| #define IS_SOEXT | ( | e | ) | (strcmp((e), ".so") == 0 || strcmp((e), ".o") == 0) |
| #define rb_intern | ( | str | ) | rb_intern2((str), strlen(str)) |
| enum expand_type |
| void Init_load | ( | void | ) |
Definition at line 1183 of file load.c.
References GET_VM, rb_define_hooked_variable(), and rb_intern2().
| NORETURN | ( | static void | load_failedVALUE | ) |
Definition at line 827 of file load.c.
References rb_require_safe(), and rb_safe_level().
Definition at line 841 of file load.c.
References NIL_P, rb_current_realfilepath(), rb_file_absolute_path(), rb_file_dirname(), rb_loaderror(), rb_require_safe(), and rb_safe_level().
Definition at line 528 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 107 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().
Definition at line 512 of file iseq.c.
References rb_check_funcall(), rb_cISeq, rb_intern, RBASIC_CLASS, and SPECIAL_CONST_P.
| void rb_load_protect | ( | VALUE | fname, |
| int | wrap, | ||
| int * | pstate | ||
| ) |
| int rb_provided | ( | const char * | feature | ) |
Definition at line 522 of file load.c.
References rb_feature_provided().
Definition at line 1061 of file load.c.
References rb_require_safe(), rb_safe_level(), and rb_str_new_cstr().
Referenced by Init_generator(), Init_md5(), Init_ossl_digest(), Init_parser(), Init_rmd160(), and Init_sha1().
| int rb_require_internal | ( | VALUE | fname, |
| int | safe | ||
| ) |
Definition at line 962 of file load.c.
References rb_thread_struct::ec, rb_execution_context_struct::errinfo, EXEC_TAG, GET_THREAD, rb_get_path_check(), rb_safe_level(), rb_set_safe_level_force(), rb_str_encode_ospath(), loaded_feature_searching::result, RSTRING_PTR, RUBY_DTRACE_HOOK, MEMO::state, TAG_NONE, and TH_PUSH_TAG.
Referenced by rb_require_safe(), and ruby_require_internal().
Definition at line 1045 of file load.c.
References JUMP_TAG, rb_errinfo(), rb_exc_raise(), rb_require_internal(), loaded_feature_searching::result, TAG_RAISE, and TAG_RETURN.
Referenced by rb_f_require(), rb_f_require_relative(), and rb_require().
| RUBY_FUNC_EXPORTED void ruby_init_ext | ( | const char * | name, |
| void(*)(void) | init | ||
| ) |
| int ruby_require_internal | ( | const char * | fname, |
| unsigned int | len | ||
| ) |
Definition at line 1035 of file load.c.
References Qnil, rb_require_internal(), rb_set_errinfo(), rb_setup_fake_str(), loaded_feature_searching::result, and TAG_RETURN.
1.8.13