Ruby: include/ruby/internal/interpreter.h Source File

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

interpreter.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERPRETER_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERPRETER_H
23#include "ruby/internal/attr/noreturn.h"
24#include "ruby/internal/attr/nonnull.h"
25#include "ruby/internal/dllexport.h"
26#include "ruby/internal/value.h"
27
28 RBIMPL_SYMBOL_EXPORT_BEGIN()
29
30
51 RBIMPL_ATTR_NONNULL(())
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);
144 void ruby_init_stack(volatile VALUE *addr);
145
158int ruby_setup(void);
159
171int ruby_cleanup(int ex);
172
181void ruby_finalize(void);
182
183 RBIMPL_ATTR_NORETURN()
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
302 RBIMPL_SYMBOL_EXPORT_END()
303
304#endif /* RBIMPL_INTERPRETER_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
ruby_stop
void ruby_stop(int)
Calls ruby_cleanup() and exits the process.
Definition eval.c:298
ruby_exec_node
int ruby_exec_node(void *n)
Identical to ruby_run_node(), except it returns an opaque execution status.
Definition eval.c:334
ruby_setup
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition eval.c:66
ruby_finalize
void ruby_finalize(void)
Runs the VM finalization processes.
Definition eval.c:172
ruby_init_stack
void ruby_init_stack(volatile VALUE *addr)
Set stack bottom of Ruby implementation.
ruby_script
void ruby_script(const char *name)
Sets the current script name to this value.
Definition ruby.c:2614
ruby_set_argv
void ruby_set_argv(int argc, char **argv)
Sets argv that ruby understands.
Definition ruby.c:2729
ruby_set_script_name
void ruby_set_script_name(VALUE name)
Identical to ruby_script(), except it takes the name as a Ruby String instance.
Definition ruby.c:2627
ruby_cleanup
int ruby_cleanup(int ex)
Destructs the VM.
Definition eval.c:180
ruby_stack_length
size_t ruby_stack_length(VALUE **topnotch)
Queries what Ruby thinks is the machine stack.
Definition gc.c:6460
ruby_stack_check
int ruby_stack_check(void)
Checks for stack overflow.
Definition gc.c:6500
ruby_init_loadpath
void ruby_init_loadpath(void)
Sets up $LOAD_PATH.
Definition ruby.c:634
ruby_process_options
void * ruby_process_options(int argc, char **argv)
Identical to ruby_options(), except it raises ruby-level exceptions on failure.
Definition ruby.c:2744
ruby_prog_init
void ruby_prog_init(void)
Defines built-in variables.
Definition ruby.c:2697
ruby_sig_finalize
void ruby_sig_finalize(void)
Clear signal handlers.
Definition signal.c:1497
ruby_incpush
void ruby_incpush(const char *path)
Appends the given path to the end of the load path.
Definition ruby.c:469
ruby_init
void ruby_init(void)
Calls ruby_setup() and check error.
Definition eval.c:99
ruby_show_copyright
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition version.c:179
ruby_sysinit
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition ruby.c:2797
ruby_show_version
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition version.c:165
ruby_executable_node
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition eval.c:304
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
noreturn.h
Defines RBIMPL_ATTR_NORETURN.
RBIMPL_ATTR_NORETURN
#define RBIMPL_ATTR_NORETURN()
Wraps (or simulates) [[noreturn]]
Definition noreturn.h:38
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40