12 #ifndef RUBY_INTERNAL_H
13 #define RUBY_INTERNAL_H 1
15 #if defined(__cplusplus)
22 #ifdef HAVE_VALGRIND_MEMCHECK_H
23 # include <valgrind/memcheck.h>
24 # ifndef VALGRIND_MAKE_MEM_DEFINED
25 # define VALGRIND_MAKE_MEM_DEFINED(p, n) VALGRIND_MAKE_READABLE((p), (n))
27 # ifndef VALGRIND_MAKE_MEM_UNDEFINED
28 # define VALGRIND_MAKE_MEM_UNDEFINED(p, n) VALGRIND_MAKE_WRITABLE((p), (n))
31 # define VALGRIND_MAKE_MEM_DEFINED(p, n) 0
32 # define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
35 #define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
37 #define STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[1 - 2*!(expr)]
39 #define GCC_VERSION_SINCE(major, minor, patchlevel) \
40 (defined(__GNUC__) && !defined(__INTEL_COMPILER) && \
41 ((__GNUC__ > (major)) || \
42 (__GNUC__ == (major) && __GNUC_MINOR__ > (minor)) || \
43 (__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))
45 #define SIGNED_INTEGER_TYPE_P(int_type) (0 > ((int_type)0)-1)
46 #define SIGNED_INTEGER_MAX(sint_type) \
48 ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) | \
49 ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) - 1))
50 #define SIGNED_INTEGER_MIN(sint_type) (-SIGNED_INTEGER_MAX(sint_type)-1)
51 #define UNSIGNED_INTEGER_MAX(uint_type) (~(uint_type)0)
53 #if SIGNEDNESS_OF_TIME_T < 0
54 # define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
55 # define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
56 #elif SIGNEDNESS_OF_TIME_T > 0
57 # define TIMET_MAX UNSIGNED_INTEGER_MAX(time_t)
58 # define TIMET_MIN ((time_t)0)
60 #define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))
62 #define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
64 (a) == -1 ? (b) < -(max) : \
66 ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
67 ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
68 #define MUL_OVERFLOW_FIXNUM_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
69 #define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
70 #define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
73 # ifdef HAVE_BUILTIN___BUILTIN_BSWAP16
74 # define swap16(x) __builtin_bswap16(x)
79 # define swap16(x) ((uint16_t)((((x)&0xFF)<<8) | (((x)>>8)&0xFF)))
83 # ifdef HAVE_BUILTIN___BUILTIN_BSWAP32
84 # define swap32(x) __builtin_bswap32(x)
89 # define swap32(x) ((uint32_t)((((x)&0xFF)<<24) \
91 |(((x)&0x0000FF00)<<8) \
92 |(((x)&0x00FF0000)>>8) ))
96 # ifdef HAVE_BUILTIN___BUILTIN_BSWAP64
97 # define swap64(x) __builtin_bswap64(x)
103 # define byte_in_64bit(n) ((uint64_t)0xff << (n))
104 # define swap64(x) ((uint64_t)((((x)&byte_in_64bit(0))<<56) \
106 |(((x)&byte_in_64bit(8))<<40) \
107 |(((x)&byte_in_64bit(48))>>40) \
108 |(((x)&byte_in_64bit(16))<<24) \
109 |(((x)&byte_in_64bit(40))>>24) \
110 |(((x)&byte_in_64bit(24))<<8) \
111 |(((x)&byte_in_64bit(32))>>8)))
118 #if defined(HAVE_BUILTIN___BUILTIN_CLZ)
119 if (x == 0)
return SIZEOF_INT *
CHAR_BIT;
120 return __builtin_clz(x);
123 # if 64 < SIZEOF_INT * CHAR_BIT
125 # elif 32 < SIZEOF_INT * CHAR_BIT
130 # if 64 < SIZEOF_INT * CHAR_BIT
131 y = x >> 64;
if (y) {n -= 64; x = y;}
133 # if 32 < SIZEOF_INT * CHAR_BIT
134 y = x >> 32;
if (y) {n -= 32; x = y;}
136 y = x >> 16;
if (y) {n -= 16; x = y;}
137 y = x >> 8;
if (y) {n -= 8; x = y;}
138 y = x >> 4;
if (y) {n -= 4; x = y;}
139 y = x >> 2;
if (y) {n -= 2; x = y;}
140 y = x >> 1;
if (y) {
return n - 2;}
148 #if defined(HAVE_BUILTIN___BUILTIN_CLZL)
149 if (x == 0)
return SIZEOF_LONG *
CHAR_BIT;
150 return __builtin_clzl(x);
153 # if 64 < SIZEOF_LONG * CHAR_BIT
155 # elif 32 < SIZEOF_LONG * CHAR_BIT
160 # if 64 < SIZEOF_LONG * CHAR_BIT
161 y = x >> 64;
if (y) {n -= 64; x = y;}
163 # if 32 < SIZEOF_LONG * CHAR_BIT
164 y = x >> 32;
if (y) {n -= 32; x = y;}
166 y = x >> 16;
if (y) {n -= 16; x = y;}
167 y = x >> 8;
if (y) {n -= 8; x = y;}
168 y = x >> 4;
if (y) {n -= 4; x = y;}
169 y = x >> 2;
if (y) {n -= 2; x = y;}
170 y = x >> 1;
if (y) {
return n - 2;}
175 #ifdef HAVE_LONG_LONG
177 nlz_long_long(
unsigned LONG_LONG x)
179 #if defined(HAVE_BUILTIN___BUILTIN_CLZLL)
180 if (x == 0)
return SIZEOF_LONG_LONG *
CHAR_BIT;
181 return __builtin_clzll(x);
183 unsigned LONG_LONG y;
184 # if 64 < SIZEOF_LONG_LONG * CHAR_BIT
186 # elif 32 < SIZEOF_LONG_LONG * CHAR_BIT
191 # if 64 < SIZEOF_LONG_LONG * CHAR_BIT
192 y = x >> 64;
if (y) {n -= 64; x = y;}
194 # if 32 < SIZEOF_LONG_LONG * CHAR_BIT
195 y = x >> 32;
if (y) {n -= 32; x = y;}
197 y = x >> 16;
if (y) {n -= 16; x = y;}
198 y = x >> 8;
if (y) {n -= 8; x = y;}
199 y = x >> 4;
if (y) {n -= 4; x = y;}
200 y = x >> 2;
if (y) {n -= 2; x = y;}
201 y = x >> 1;
if (y) {
return n - 2;}
207 #ifdef HAVE_UINT128_T
209 nlz_int128(uint128_t x)
213 y = x >> 64;
if (y) {n -= 64; x = y;}
214 y = x >> 32;
if (y) {n -= 32; x = y;}
215 y = x >> 16;
if (y) {n -= 16; x = y;}
216 y = x >> 8;
if (y) {n -= 8; x = y;}
217 y = x >> 4;
if (y) {n -= 4; x = y;}
218 y = x >> 2;
if (y) {n -= 2; x = y;}
219 y = x >> 1;
if (y) {
return n - 2;}
224 #if defined(HAVE_UINT128_T)
225 # define bit_length(x) \
226 (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
227 sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
228 sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)) : \
229 SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)(x)))
230 #elif defined(HAVE_LONG_LONG)
231 # define bit_length(x) \
232 (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
233 sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
234 SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)))
236 # define bit_length(x) \
237 (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
238 SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)))
253 #if defined(HAVE_LONG_LONG)
255 #define SERIALT2NUM ULL2NUM
256 #elif defined(HAVE_UINT64_T)
258 #define SERIALT2NUM SIZET2NUM
261 #define SERIALT2NUM ULONG2NUM
291 #define RCLASS_EXT(c) (RCLASS(c)->ptr)
292 #define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
293 #define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
294 #define RCLASS_M_TBL_WRAPPER(c) (RCLASS(c)->m_tbl_wrapper)
295 #define RCLASS_M_TBL(c) (RCLASS_M_TBL_WRAPPER(c) ? RCLASS_M_TBL_WRAPPER(c)->tbl : 0)
296 #define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
297 #define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin)
298 #define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
299 #define RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
315 return RCLASS(klass)->super;
380 #ifdef RUBY_ENCODING_H
402 #define rb_ascii8bit_encindex() ENCINDEX_ASCII
403 #define rb_utf8_encindex() ENCINDEX_UTF_8
404 #define rb_usascii_encindex() ENCINDEX_US_ASCII
438 #ifdef RUBY_FUNCTION_NAME_STRING
439 # if defined __GNUC__ && __GNUC__ >= 4
440 # pragma GCC visibility push(default)
444 # if defined __GNUC__ && __GNUC__ >= 4
445 # pragma GCC visibility pop
447 # define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
448 # define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
450 # define rb_sys_fail_path(path) rb_sys_fail_str(path)
451 # define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
462 #if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE) || defined(_WIN32)
463 #define ruby_sized_xrealloc(ptr, new_size, old_size) ruby_xrealloc(ptr, new_size)
464 #define ruby_sized_xrealloc2(ptr, new_count, element_size, old_count) ruby_xrealloc(ptr, new_count, element_size)
465 #define ruby_sized_xfree(ptr, size) ruby_xfree(ptr)
466 #define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n)
471 #define SIZED_REALLOC_N(var,type,n,old_n) ((var)=(type*)ruby_sized_xrealloc((char*)(var), (n) * sizeof(type), (old_n) * sizeof(type)))
478 #define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
481 #define HASH_DELETED FL_USER1
482 #define HASH_PROC_DEFAULT FL_USER2
535 #define RUBY_BIT_ROTL(v, n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
536 #define RUBY_BIT_ROTR(v, n) (((v) >> (n)) | ((v) << ((sizeof(v) * 8) - n)))
544 if (v != (
VALUE)0x8000000000000002) {
550 VALUE b63 = (v >> 63);
562 return ((
struct RFloat *)v)->float_value;
582 if (
t.v != 0x3000000000000000 &&
583 !((bits-3) & ~0x01)) {
586 else if (
t.v == (
VALUE)0) {
588 return 0x8000000000000002;
595 #define rb_float_value(v) rb_float_value_inline(v)
596 #define rb_float_new(d) rb_float_new_inline(d)
609 #define RBASIC_CLEAR_CLASS(obj) (((struct RBasicRaw *)((VALUE)(obj)))->klass = 0)
610 #define RBASIC_SET_CLASS_RAW(obj, cls) (((struct RBasicRaw *)((VALUE)(obj)))->klass = (cls))
611 #define RBASIC_SET_CLASS(obj, cls) do { \
612 VALUE _obj_ = (obj); \
613 RB_OBJ_WRITE(_obj_, &((struct RBasicRaw *)(_obj_))->klass, cls); \
637 #define RB_MAX_GROUPS (65536)
685 #define ARGVSTR2ARGC(argv_str) (RSTRING_LEN(argv_str) / sizeof(char *) - 2)
686 #define ARGVSTR2ARGV(argv_str) ((char **)RSTRING_PTR(argv_str) + 1)
704 #ifdef RUBY_ENCODING_H
717 #define QUOTE(str) rb_str_quote_unprintable(str)
718 #define QUOTE_ID(id) rb_id_quote_unprintable(id)
721 #ifdef RUBY_ENCODING_H
724 #define STR_NOEMBED FL_USER1
725 #define STR_SHARED FL_USER2
726 #define STR_ASSOC FL_USER3
727 #define STR_SHARED_P(s) FL_ALL_RAW((s), STR_NOEMBED|ELTS_SHARED)
728 #define STR_ASSOC_P(s) FL_ALL_RAW((s), STR_NOEMBED|STR_ASSOC)
729 #define STR_NOCAPA (STR_NOEMBED|ELTS_SHARED|STR_ASSOC)
730 #define STR_NOCAPA_P(s) (FL_TEST_RAW((s),STR_NOEMBED) && FL_ANY_RAW((s),ELTS_SHARED|STR_ASSOC))
731 #define STR_EMBED_P(str) (!FL_TEST_RAW((str), STR_NOEMBED))
732 #define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
733 #define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
831 #if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
843 VALUE rb_str_normalize_ospath(
const char *
ptr,
long len);
866 #if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
872 extern unsigned long ruby_scan_digits(
const char *str, ssize_t
len,
int base,
size_t *retlen,
int *overflow);
884 #define RB_OBJ_GC_FLAGS_MAX 5
889 #if defined(__cplusplus)
void rb_class_remove_from_super_subclasses(VALUE klass)
const char * rb_builtin_class_name(VALUE x)
VALUE rb_str_locktmp_ensure(VALUE str, VALUE(*func)(VALUE), VALUE arg)
static st_index_t new_size(st_index_t size)
void rb_class_detach_subclasses(VALUE klass)
VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck)
VALUE rb_get_coverages(void)
#define RB_OBJ_WRITE(a, slot, b)
#define RUBY_BIT_ROTR(v, n)
void rb_file_const(const char *, VALUE)
void rb_backtrace_print_as_bugreport(void)
VALUE(* rb_alloc_func_t)(VALUE)
int rb_is_class_name(VALUE name)
rb_pid_t rb_fork_async_signal_safe(int *status, int(*chfunc)(void *, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen)
VALUE rb_proc_location(VALUE self)
VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj)
VALUE rb_gcd_normal(VALUE self, VALUE other)
struct rb_execarg::@109::@110 sh
VALUE rb_get_expanded_load_path(void)
void rb_mark_generic_ivar(VALUE)
void Init_vm_backtrace(void)
void rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE))
VALUE(* rb_block_call_func_t)(ANYARGS)
int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char *errmsg, size_t errmsg_buflen)
VALUE rb_blocking_function_t(void *)
VALUE rb_math_hypot(VALUE, VALUE)
int rb_file_load_ok(const char *)
void rb_backtrace_print_to(VALUE output)
st_table * st_init_numtable(void)
VALUE rb_str_quote_unprintable(VALUE)
void ruby_kill(rb_pid_t pid, int sig)
void rb_class_remove_from_module_subclasses(VALUE klass)
int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values)
SSL_METHOD *(* func)(void)
VALUE rb_block_clear_env_self(VALUE proc)
VALUE rb_hash_values(VALUE hash)
void * ruby_mimmalloc(size_t size)
void rb_fiber_reset_root_local_storage(VALUE thval)
VALUE rb_insns_name_array(void)
const char * rb_builtin_type_name(int t)
const void ** rb_vm_get_insns_address_table(void)
VALUE rb_refinement_module_get_refined_class(VALUE module)
unsigned unsetenv_others_given
int rb_st_insert_id_and_value(VALUE obj, st_table *tbl, ID key, VALUE value)
void rb_gc_mark_global_tbl(void)
VALUE rb_big_mul_normal(VALUE x, VALUE y)
void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE)
void ruby_debug_printf(const char *format,...)
VALUE rb_ary_last(int argc, VALUE *argv, VALUE ary)
int rb_num_to_uint(VALUE val, unsigned int *ret)
void rb_vm_inc_const_missing_count(void)
VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash)
VALUE rb_iseq_method_name(VALUE self)
void rb_thread_mark(void *th)
VALUE rb_file_expand_path_fast(VALUE, VALUE)
#define PRINTF_ARGS(decl, string_index, first_to_check)
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
void rb_vm_pop_cfunc_frame(void)
void rb_async_bug_errno(const char *mesg, int errno_arg)
VALUE rb_get_load_path(void)
VALUE rb_str2big_normal(VALUE arg, int base, int badcheck)
void rb_mark_generic_ivar_tbl(void)
void Init_class_hierarchy(void)
VALUE rb_iseq_first_lineno(VALUE iseqval)
VALUE rb_big_fdiv(VALUE x, VALUE y)
VALUE rb_math_cosh(VALUE)
VALUE rb_integer_float_cmp(VALUE x, VALUE y)
VALUE rb_execarg_new(int argc, VALUE *argv, int accept_shell)
int rb_num_negative_p(VALUE)
VALUE rb_backtrace_to_str_ary(VALUE obj)
#define RCLASS_M_TBL_WRAPPER(c)
VALUE rb_vm_thread_backtrace(int argc, VALUE *argv, VALUE thval)
void rb_last_status_clear(void)
rb_subclass_entry_t ** module_subclasses
In the case that this is an ICLASS, module_subclasses points to the link in the module's subclasses l...
VALUE rb_math_sqrt(VALUE)
size_t rb_obj_memsize_of(VALUE)
VALUE rb_int_positive_pow(long x, unsigned long y)
struct st_table * rb_hash_tbl_raw(VALUE hash)
void rb_vm_change_state(void)
VALUE rb_iseq_absolute_path(VALUE iseqval)
void rb_load_fail(VALUE path, const char *err)
VALUE rb_lcm(VALUE x, VALUE y)
VALUE rb_default_home_dir(VALUE result)
VALUE rb_execarg_init(int argc, VALUE *argv, int accept_shell, VALUE execarg_obj)
VALUE rb_obj_is_thread(VALUE obj)
double ruby_float_mod(double x, double y)
VALUE rb_parser_set_yydebug(VALUE self, VALUE flag)
VALUE rb_dbl_hash(double d)
unsigned long rb_event_flag_t
char conflict[sizeof(VALUE)*3]
VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
void rb_print_backtrace(void)
static unsigned char * output
unsigned unsetenv_others_do
rb_subclass_entry_t * subclasses
VALUE rb_extract_keywords(VALUE *orighash)
int rb_is_method_name(VALUE name)
VALUE rb_iseq_base_label(VALUE iseqval)
static VALUE RCLASS_SUPER(VALUE klass)
unsigned long long uint64_t
VALUE rb_big_mul_balance(VALUE x, VALUE y)
VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc)
VALUE rb_iseq_klass(VALUE iseqval)
RUBY_SYMBOL_EXPORT_BEGIN const char * rb_objspace_data_type_name(VALUE obj)
void rb_mark_end_proc(void)
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p)
VALUE rb_big_sq_fast(VALUE x)
void rb_compile_bug(const char *file, int line, const char *fmt,...)
const char * rb_insns_name(int i)
VALUE rb_special_singleton_class(VALUE obj)
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
int rb_str_symname_p(VALUE)
void ruby_set_inplace_mode(const char *)
VALUE rb_big2str_generic(VALUE x, int base)
VALUE rb_get_path_check_convert(VALUE, VALUE, int)
VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl)
struct rb_execarg * rb_execarg_get(VALUE execarg_obj)
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd)
struct rb_execarg::@109::@111 cmd
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl)
static VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super)
VALUE rb_get_backtrace(VALUE info)
void rb_vm_mark(void *ptr)
void rb_class_subclass_add(VALUE super, VALUE klass)
VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg)
void rb_thread_recycle_stack_release(VALUE *)
VALUE rb_thread_shield_wait(VALUE self)
#define RUBY_BIT_ROTL(v, n)
void rb_objspace_set_event_hook(const rb_event_flag_t event)
void rb_vm_bugreport(void)
VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, int *stateptr)
VALUE rb_mutex_owned_p(VALUE self)
static void RCLASS_M_TBL_INIT(VALUE c)
VALUE rb_int_pred(VALUE num)
VALUE rb_thread_shield_release(VALUE self)
void rb_undefined_alloc(VALUE klass)
unsigned char buf[MIME_BUF_SIZE]
ssize_t rb_io_bufread(VALUE io, void *buf, size_t size)
VALUE rb_suppress_tracing(VALUE(*func)(VALUE), VALUE arg)
void rb_maygvl_fd_fix_cloexec(int fd)
VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj)
int rb_parse_in_main(void)
static VALUE rb_float_new_inline(double d)
VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE)
int rb_obj_basic_to_s_p(VALUE obj)
void rb_call_end_proc(VALUE data)
VALUE rb_rational_reciprocal(VALUE x)
size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, rb_encoding *enc, const struct vtm *vtm, struct timespec *ts, int gmt)
int rb_dvar_defined(ID id)
VALUE rb_thread_shield_destroy(VALUE self)
unsigned close_others_given
VALUE rb_iseq_label(VALUE iseqval)
struct st_table * iv_index_tbl
VALUE rb_math_log(int argc, VALUE *argv)
st_table * rb_st_copy(VALUE obj, struct st_table *orig_tbl)
static int chfunc(void *data, char *errbuf, size_t errbuf_len)
int rb_is_attrset_name(VALUE name)
#define RUBY_SYMBOL_EXPORT_END
rb_serial_t rb_next_class_serial(void)
VALUE rb_big2str_poweroftwo(VALUE x, int base)
VALUE rb_obj_is_mutex(VALUE obj)
VALUE rb_vm_backtrace_object(void)
void rb_gc_resurrect(VALUE ptr)
void rb_gc_mark_symbols(int full_mark)
unsigned new_pgroup_given
int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen)
void rb_mutex_allow_trap(VALUE self, int val)
VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj)
void * ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_ALLOC_SIZE((2
size_t rb_obj_gc_flags(VALUE, ID[], size_t)
#define RUBY_SYMBOL_EXPORT_BEGIN
void void ruby_sized_xfree(void *x, size_t size)
VALUE rb_int_succ(VALUE num)
VALUE rb_big_mul_karatsuba(VALUE x, VALUE y)
VALUE rb_reg_check_preprocess(VALUE)
void rb_class_detach_module_subclasses(VALUE klass)
VALUE rb_id_quote_unprintable(ID)
void ruby_error_print(void)
VALUE rb_equal_opt(VALUE obj1, VALUE obj2)
rb_subclass_entry_t * next
const signed char ruby_digit36_to_number_table[]
VALUE rb_home_dir_of(VALUE user, VALUE result)
VALUE rb_obj_equal(VALUE obj1, VALUE obj2)
int rb_is_const_name(VALUE name)
static int nlz_int(unsigned int x)
int rb_is_local_name(VALUE name)
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
VALUE rb_big_uminus(VALUE x)
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict)
void rb_gc_mark_parser(void)
void ruby_mimfree(void *ptr)
VALUE rb_float_new_in_heap(double)
#define RUBY_ATTR_ALLOC_SIZE(params)
VALUE rb_math_atan2(VALUE, VALUE)
VALUE rb_thread_shield_new(void)
void rb_thread_execute_interrupts(VALUE th)
union rb_execarg::@109 invoke
void rb_str_fill_terminator(VALUE str, const int termlen)
rb_pid_t rb_fork_ruby(int *status)
VALUE rb_big_divrem_normal(VALUE x, VALUE y)
int rb_bug_reporter_add(void(*func)(FILE *, void *), void *data)
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
VALUE rb_obj_is_fiber(VALUE obj)
VALUE rb_big_mul_toom3(VALUE x, VALUE y)
VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj)
VALUE rb_make_backtrace(void)
VALUE rb_check_backtrace(VALUE bt)
int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val)
void ruby_gc_set_params(int safe_level)
rb_subclass_entry_t ** parent_subclasses
VALUE rb_integer_float_eq(VALUE x, VALUE y)
void rb_obj_copy_ivar(VALUE dest, VALUE obj)
void rb_execarg_setenv(VALUE execarg_obj, VALUE env)
int rb_backtrace_p(VALUE obj)
VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE)
int rb_is_instance_name(VALUE name)
int rb_method_defined_by(VALUE obj, ID mid, VALUE(*cfunc)(ANYARGS))
static double rb_float_value_inline(VALUE v)
struct st_table * const_tbl
int rb_is_junk_name(VALUE name)
VALUE rb_backtrace_to_location_ary(VALUE obj)
VALUE rb_math_sinh(VALUE)
VALUE rb_current_realfilepath(void)
VALUE rb_uninterruptible(VALUE(*b_proc)(ANYARGS), VALUE data)
void ruby_register_rollback_func_for_ensure(VALUE(*ensure_func)(ANYARGS), VALUE(*rollback_func)(ANYARGS))
const char * ruby_get_inplace_mode(void)
void rb_stdio_set_default_encoding(void)
rb_alloc_func_t allocator
int rb_sigaltstack_size(void)
unsigned long rb_serial_t
VALUE rb_get_path_check_to_string(VALUE, int)
void Init_native_thread(void)
void rb_clear_trace_func(void)
int rb_parse_in_eval(void)
void rb_gc_mark_encodings(void)
VALUE rb_parser_get_yydebug(VALUE self)
VALUE rb_iseq_path(VALUE iseqval)
VALUE rb_struct_init_copy(VALUE copy, VALUE s)
VALUE rb_io_flush_raw(VALUE, int)
int rb_get_next_signal(void)
VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck)
VALUE rb_invcmp(VALUE x, VALUE y)
VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase)
void rb_write_error_str(VALUE mesg)
VALUE rb_hash_keys(VALUE hash)
int rb_local_defined(ID id)
st_index_t rb_hash_proc(st_index_t hash, VALUE proc)
void rb_ary_delete_same(VALUE ary, VALUE item)
VALUE rb_vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval)
void Init_eval_method(void)
void rb_gc_writebarrier_remember_promoted(VALUE obj)
VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
struct timeval rb_time_timeval(VALUE)
void * ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2))
static int nlz_long(unsigned long x)
void rb_ary_set_len(VALUE ary, long len)
VALUE rb_sourcefilename(void)
size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc, const struct vtm *vtm, VALUE timev, int gmt)
void rb_execarg_fixup(VALUE execarg_obj)
int rb_is_global_name(VALUE name)