Ruby 3.2.1p31 (2023-02-08 revision 31819e82c88c6f8ecfaeb162519bfa26a14b21fd)
interpreter.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERPRETER_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERPRETER_H
26#include "ruby/internal/value.h"
27
29
30
68void ruby_sysinit(int *argc, char ***argv);
69
75void ruby_init(void);
76
92void* ruby_options(int argc, char** argv);
93
107int ruby_executable_node(void *n, int *status);
108
116int ruby_run_node(void *n);
117
118/* version.c */
120void ruby_show_version(void);
121
122#ifndef ruby_show_copyright
124void ruby_show_copyright(void);
125#endif
126
131#define RUBY_INIT_STACK \
132 VALUE variable_in_this_stack_frame; \
133 ruby_init_stack(&variable_in_this_stack_frame);
144void ruby_init_stack(volatile VALUE *addr);
145
158int ruby_setup(void);
159
171int ruby_cleanup(int ex);
172
181void ruby_finalize(void);
182
185void ruby_stop(int);
186
197int ruby_stack_check(void);
198
214size_t ruby_stack_length(VALUE **topnotch);
215
230int ruby_exec_node(void *n);
231
240void ruby_script(const char* name);
241
248void ruby_set_script_name(VALUE name);
249
251void ruby_prog_init(void);
252
261void ruby_set_argv(int argc, char **argv);
262
271void *ruby_process_options(int argc, char **argv);
272
281void ruby_init_loadpath(void);
282
289void ruby_incpush(const char *path);
290
298void ruby_sig_finalize(void);
299
303
304#endif /* RBIMPL_INTERPRETER_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
void ruby_stop(int)
Calls ruby_cleanup() and exits the process.
Definition eval.c:298
int ruby_exec_node(void *n)
Identical to ruby_run_node(), except it returns an opaque execution status.
Definition eval.c:334
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition eval.c:66
void ruby_finalize(void)
Runs the VM finalization processes.
Definition eval.c:172
void ruby_init_stack(volatile VALUE *addr)
Set stack bottom of Ruby implementation.
void ruby_script(const char *name)
Sets the current script name to this value.
Definition ruby.c:2594
void ruby_set_argv(int argc, char **argv)
Sets argv that ruby understands.
Definition ruby.c:2709
void ruby_set_script_name(VALUE name)
Identical to ruby_script(), except it takes the name as a Ruby String instance.
Definition ruby.c:2607
int ruby_cleanup(int ex)
Destructs the VM.
Definition eval.c:180
size_t ruby_stack_length(VALUE **topnotch)
Queries what Ruby thinks is the machine stack.
Definition gc.c:6449
int ruby_stack_check(void)
Checks for stack overflow.
Definition gc.c:6489
void ruby_init_loadpath(void)
Sets up $LOAD_PATH.
Definition ruby.c:634
void * ruby_process_options(int argc, char **argv)
Identical to ruby_options(), except it raises ruby-level exceptions on failure.
Definition ruby.c:2724
void ruby_prog_init(void)
Defines built-in variables.
Definition ruby.c:2677
void ruby_sig_finalize(void)
Clear signal handlers.
Definition signal.c:1497
void ruby_incpush(const char *path)
Appends the given path to the end of the load path.
Definition ruby.c:469
void ruby_init(void)
Calls ruby_setup() and check error.
Definition eval.c:99
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition version.c:179
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition ruby.c:2777
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition version.c:165
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition eval.c:304
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
Defines RBIMPL_ATTR_NORETURN.
#define RBIMPL_ATTR_NORETURN()
Wraps (or simulates) [[noreturn]]
Definition noreturn.h:38
Defines VALUE and ID.
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40