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

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

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/dllexport.h"
25#include "ruby/internal/value.h"
26
27 RBIMPL_SYMBOL_EXPORT_BEGIN()
28
29
45void ruby_sysinit(int *argc, char ***argv);
46void ruby_init(void);
47void* ruby_options(int argc, char** argv);
48int ruby_executable_node(void *n, int *status);
49int ruby_run_node(void *n);
50
51/* version.c */
52void ruby_show_version(void);
53#ifndef ruby_show_copyright
54void ruby_show_copyright(void);
55#endif
56
59#define RUBY_INIT_STACK \
60 VALUE variable_in_this_stack_frame; \
61 ruby_init_stack(&variable_in_this_stack_frame);
64 void ruby_init_stack(volatile VALUE*);
65
66int ruby_setup(void);
67int ruby_cleanup(volatile int);
68
69void ruby_finalize(void);
70
71 RBIMPL_ATTR_NORETURN()
72void ruby_stop(int);
73
74int ruby_stack_check(void);
75size_t ruby_stack_length(VALUE**);
76
77int ruby_exec_node(void *n);
78
79void ruby_script(const char* name);
80void ruby_set_script_name(VALUE name);
81
82void ruby_prog_init(void);
83void ruby_set_argv(int, char**);
84void *ruby_process_options(int, char**);
85void ruby_init_loadpath(void);
86void ruby_incpush(const char*);
87void ruby_sig_finalize(void);
88
91 RBIMPL_SYMBOL_EXPORT_END()
92
93#endif /* RBIMPL_INTERPRETER_H */
dllexport.h
Tewaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
ruby_run_node
#define ruby_run_node
Definition: goruby.c:3
ruby_options
#define ruby_options
Definition: goruby.c:2
ruby_stop
void ruby_stop(int)
Calls ruby_cleanup() and exits the process.
Definition: eval.c:327
ruby_set_argv
void ruby_set_argv(int, char **)
Definition: ruby.c:2574
ruby_exec_node
int ruby_exec_node(void *n)
Runs the given compiled source.
Definition: eval.c:380
ruby_incpush
void ruby_incpush(const char *)
Definition: ruby.c:456
ruby_setup
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition: eval.c:70
ruby_finalize
void ruby_finalize(void)
Runs the VM finalization processes.
Definition: eval.c:195
ruby_script
void ruby_script(const char *name)
Sets the current script name to this value.
Definition: ruby.c:2458
ruby_set_script_name
void ruby_set_script_name(VALUE name)
Sets the current script name to this value.
Definition: ruby.c:2471
ruby_stack_check
int ruby_stack_check(void)
Definition: gc.c:5552
ruby_init_loadpath
void ruby_init_loadpath(void)
Definition: ruby.c:616
ruby_init_stack
void ruby_init_stack(volatile VALUE *)
ruby_process_options
void * ruby_process_options(int, char **)
Definition: ruby.c:2595
ruby_prog_init
void ruby_prog_init(void)
Defines built-in variables.
Definition: ruby.c:2542
ruby_cleanup
int ruby_cleanup(volatile int)
Destructs the VM.
Definition: eval.c:213
ruby_sig_finalize
void ruby_sig_finalize(void)
Definition: signal.c:1496
ruby_stack_length
size_t ruby_stack_length(VALUE **)
Definition: gc.c:5512
ruby_init
void ruby_init(void)
Calls ruby_setup() and check error.
Definition: eval.c:108
ruby_show_copyright
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition: version.c:138
ruby_sysinit
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition: ruby.c:2655
ruby_show_version
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition: version.c:119
ruby_executable_node
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition: eval.c:345
name
const char * name
Definition: nkf.c:208
noreturn.h
Defines RBIMPL_ATTR_NORETURN.
RBIMPL_ATTR_NORETURN
#define RBIMPL_ATTR_NORETURN()
Wraps (or simulates) [[noreturn]]
Definition: noreturn.h:38
argc
int argc
Definition: ruby.c:240
argv
char ** argv
Definition: ruby.c:241
const
#define const
Definition: strftime.c:108
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38