|
Ruby
2.7.2p137(2020-10-01revision5445e0435260b449decf2ac16f9d09bae3cafe72)
|
CRuby interpreter APIs. More...
Modules | |
| ruby(1) implementation | |
| A part of the implementation of ruby(1) command. | |
Functions | |
| void | ruby_init_stack (volatile VALUE *) |
| int | ruby_setup (void) |
| Initializes the VM and builtin libraries. More... | |
| int | ruby_cleanup (volatile int) |
| Destructs the VM. More... | |
| void | ruby_finalize (void) |
| Runs the VM finalization processes. More... | |
| void | ruby_set_stack_size (size_t) |
| int | ruby_stack_check (void) |
| size_t | ruby_stack_length (VALUE **) |
| int | ruby_exec_node (void *n) |
| Runs the given compiled source. More... | |
| void | ruby_script (const char *name) |
| Sets the current script name to this value. More... | |
| void | ruby_set_script_name (VALUE name) |
| Sets the current script name to this value. More... | |
| void | ruby_prog_init (void) |
| Defines built-in variables. More... | |
| void | ruby_set_argv (int, char **) |
| void * | ruby_process_options (int, char **) |
| void | ruby_init_loadpath (void) |
| void | ruby_incpush (const char *) |
| void | ruby_sig_finalize (void) |
| NORETURN (void rb_vm_jump_tag_but_local_jump(int)) | |
CRuby interpreter APIs.
These are APIs to embed MRI interpreter into your program. These functions are not a part of Ruby extension library API. Extension libraries of Ruby should not depend on these functions.
| NORETURN | ( | void | rb_vm_jump_tag_but_local_jumpint | ) |
| int ruby_cleanup | ( | volatile int | ex | ) |
Destructs the VM.
Runs the VM finalization processes as well as ruby_finalize(), and frees resources used by the VM.
| ex | Default value to the return value. |
Definition at line 181 of file eval.c.
Referenced by ruby_stop().
| int ruby_exec_node | ( | void * | n | ) |
Runs the given compiled source.
Definition at line 341 of file eval.c.
References ruby_init_stack().
| void ruby_finalize | ( | void | ) |
| void ruby_incpush | ( | const char * | ) |
Definition at line 426 of file ruby.c.
References ruby_push_include().
| void ruby_init_loadpath | ( | void | ) |
Definition at line 582 of file ruby.c.
References GET_VM, getenv(), NULL, OBJ_FREEZE_RAW, PREFIX_PATH, rb_ascii8bit_encoding(), rb_enc_path_last_separator(), rb_gc_register_address(), rb_str_cat_cstr(), rb_str_resize(), rb_str_subseq(), rb_strlen_lit, RSTRING_PTR, ruby_archlibdir_path, ruby_exec_prefix, ruby_initial_load_paths, ruby_prefix_path, ruby_push_include(), strlen(), STRNCASECMP, and strrchr().
| void ruby_init_stack | ( | volatile VALUE * | ) |
Referenced by ruby_exec_node(), ruby_options(), and ruby_setup().
| void* ruby_process_options | ( | int | , |
| char ** | |||
| ) |
Definition at line 2399 of file ruby.c.
References argc, argv, load_file_arg::opt, and ruby_engine.
Referenced by ruby_options().
| void ruby_prog_init | ( | void | ) |
Defines built-in variables.
Definition at line 2353 of file ruby.c.
References ruby::backward::cxxanyargs::rb_define_hooked_variable(), and ruby_verbose.
Referenced by ruby_setup().
| void ruby_script | ( | const char * | name | ) |
Sets the current script name to this value.
This is similar to $0 = name in Ruby level but also affects Method::location and others.
Definition at line 2289 of file ruby.c.
References name, rb_orig_progname, and rb_progname.
| void ruby_set_script_name | ( | VALUE | name | ) |
Sets the current script name to this value.
Same as ruby_script() but accepts a VALUE.
Definition at line 2302 of file ruby.c.
References name, rb_orig_progname, rb_progname, rb_str_dup(), and rb_vm_set_progname().
| void ruby_set_stack_size | ( | size_t | ) |
| int ruby_setup | ( | void | ) |
Initializes the VM and builtin libraries.
| 0 | if succeeded. |
| non-zero | an error occurred. |
Definition at line 56 of file eval.c.
References EC_EXEC_TAG, EC_POP_TAG, EC_PUSH_TAG, GET_EC, GET_VM, Init_BareVM(), Init_heap(), Init_vm_objects(), rb_call_inits(), rb_vm_encoded_insn_data_table_init(), ruby_init_stack(), ruby_prog_init(), and TAG_NONE.
Referenced by ruby_init().
| void ruby_sig_finalize | ( | void | ) |
Definition at line 1470 of file signal.c.
References ruby_signal, sighandler_t, and SIGINT.
| size_t ruby_stack_length | ( | VALUE ** | ) |
Definition at line 4634 of file gc.c.
References GET_EC, SET_STACK_END, STACK_END, STACK_LENGTH, STACK_START, and STACK_UPPER.