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 381 enum ruby_preserved_encindex {
397 ENCINDEX_Windows_31J,
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) 442 NORETURN(
void rb_sys_fail_path_in(
const char *func_name,
VALUE path));
443 NORETURN(
void rb_syserr_fail_path_in(
const char *func_name,
int err,
VALUE path));
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);
554 t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~0x03), 3);
562 return ((
struct RFloat *)v)->float_value;
576 bits = (int)((
VALUE)(
t.v >> 60) & 0x7);
582 if (
t.v != 0x3000000000000000 &&
583 !((bits-3) & ~0x01)) {
584 return (RUBY_BIT_ROTL(
t.v, 3) & ~(
VALUE)0x01) | 0x02;
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) 835 VALUE rb_str2big_gmp(
VALUE arg,
int base,
int badcheck);
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)
double ruby_float_mod(double x, double y)
int rb_st_insert_id_and_value(VALUE obj, st_table *tbl, ID key, VALUE value)
void rb_class_remove_from_super_subclasses(VALUE)
void rb_backtrace_print_to(VALUE output)
VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc)
void rb_execarg_setenv(VALUE execarg_obj, VALUE env)
static st_index_t new_size(st_index_t size)
void rb_class_detach_subclasses(VALUE)
void rb_vm_bugreport(void)
int rb_method_defined_by(VALUE obj, ID mid, VALUE(*cfunc)(ANYARGS))
NORETURN(PRINTF_ARGS(void rb_compile_bug(const char *, int, const char *,...), 3, 4))
VALUE rb_math_sqrt(VALUE)
void rb_vm_inc_const_missing_count(void)
VALUE rb_vm_backtrace_object(void)
VALUE rb_parser_get_yydebug(VALUE)
VALUE rb_big_mul_balance(VALUE x, VALUE y)
struct st_table * iv_index_tbl
VALUE(* rb_block_call_func_t)(ANYARGS)
union rb_execarg::@123 invoke
VALUE rb_insns_name_array(void)
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
void void ruby_sized_xfree(void *x, size_t size)
VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj)
int rb_is_global_name(VALUE name)
int rb_is_instance_name(VALUE name)
void * ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2))
VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE)
rb_subclass_entry_t * next
void rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE))
void ruby_set_inplace_mode(const char *)
VALUE rb_hash_values(VALUE hash)
VALUE rb_check_backtrace(VALUE)
VALUE rb_big2str_generic(VALUE x, int base)
void rb_str_fill_terminator(VALUE str, const int termlen)
void rb_class_remove_from_module_subclasses(VALUE)
int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *)
VALUE rb_obj_is_thread(VALUE obj)
VALUE rb_reg_check_preprocess(VALUE)
VALUE rb_current_realfilepath(void)
int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char *errmsg, size_t errmsg_buflen)
VALUE rb_backtrace_to_location_ary(VALUE obj)
int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen)
int rb_is_method_name(VALUE name)
VALUE rb_str_quote_unprintable(VALUE)
VALUE rb_struct_init_copy(VALUE copy, VALUE s)
VALUE rb_big_fdiv(VALUE x, VALUE y)
struct st_table * rb_hash_tbl_raw(VALUE hash)
unsigned unsetenv_others_given
VALUE rb_suppress_tracing(VALUE(*func)(VALUE), VALUE arg)
void ruby_debug_printf(const char *format,...)
rb_subclass_entry_t * subclasses
const char * ruby_get_inplace_mode(void)
void rb_ary_set_len(VALUE, long)
SSL_METHOD *(* func)(void)
void rb_gc_mark_parser(void)
VALUE rb_obj_equal(VALUE obj1, VALUE obj2)
void * ruby_mimmalloc(size_t size)
VALUE rb_lcm(VALUE x, VALUE y)
rb_pid_t rb_fork_ruby(int *status)
void rb_async_bug_errno(const char *mesg, int errno_arg)
VALUE rb_str_locktmp_ensure(VALUE str, VALUE(*func)(VALUE), VALUE arg)
void Init_class_hierarchy(void)
VALUE rb_default_home_dir(VALUE result)
VALUE rb_parser_set_yydebug(VALUE, VALUE)
VALUE rb_file_expand_path_fast(VALUE, VALUE)
const void ** rb_vm_get_insns_address_table(void)
VALUE rb_iseq_first_lineno(VALUE iseqval)
#define RCLASS_M_TBL_WRAPPER(c)
void Init_vm_backtrace(void)
void * ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_ALLOC_SIZE((2
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd)
void rb_mutex_allow_trap(VALUE self, int val)
VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, int *stateptr)
VALUE rb_math_sinh(VALUE)
VALUE rb_refinement_module_get_refined_class(VALUE module)
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
struct st_table * const_tbl
VALUE rb_iseq_base_label(VALUE iseqval)
void rb_load_fail(VALUE path, const char *err)
rb_subclass_entry_t ** parent_subclasses
#define RUBY_ATTR_ALLOC_SIZE(params)
VALUE rb_big_mul_karatsuba(VALUE x, VALUE y)
int rb_file_load_ok(const char *)
VALUE rb_equal_opt(VALUE obj1, VALUE obj2)
VALUE rb_iseq_path(VALUE iseqval)
const char * rb_insns_name(int i)
static unsigned char * output
unsigned unsetenv_others_do
VALUE rb_big_mul_normal(VALUE x, VALUE y)
VALUE rb_extract_keywords(VALUE *orighash)
void ruby_register_rollback_func_for_ensure(VALUE(*ensure_func)(ANYARGS), VALUE(*rollback_func)(ANYARGS))
void rb_vm_change_state(void)
VALUE rb_iseq_absolute_path(VALUE iseqval)
void rb_gc_mark_encodings(void)
VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck)
VALUE rb_math_log(int argc, VALUE *argv)
static VALUE RCLASS_SUPER(VALUE klass)
VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
VALUE rb_vm_thread_backtrace(int argc, VALUE *argv, VALUE thval)
int rb_str_symname_p(VALUE)
unsigned long long uint64_t
VALUE rb_get_path_check_convert(VALUE, VALUE, int)
struct rb_execarg * rb_execarg_get(VALUE execarg_obj)
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)
void rb_compile_bug(const char *file, int line, const char *fmt,...)
void ruby_error_print(void)
void rb_vm_mark(void *ptr)
void rb_mark_generic_ivar_tbl(void)
VALUE rb_special_singleton_class(VALUE)
VALUE rb_get_coverages(void)
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict)
int rb_num_negative_p(VALUE)
VALUE rb_thread_shield_release(VALUE self)
VALUE rb_ary_last(int, VALUE *, VALUE)
VALUE rb_id_quote_unprintable(ID)
VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash)
VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl)
void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE)
static VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super)
void rb_class_subclass_add(VALUE super, VALUE klass)
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_obj_is_mutex(VALUE obj)
VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE)
void rb_gc_mark_symbols(int full_mark)
VALUE rb_io_flush_raw(VALUE, int)
VALUE rb_proc_location(VALUE self)
void rb_file_const(const char *, VALUE)
static void RCLASS_M_TBL_INIT(VALUE c)
VALUE rb_iseq_klass(VALUE iseqval)
void rb_undefined_alloc(VALUE klass)
const char * rb_builtin_class_name(VALUE x)
VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj)
VALUE rb_int_pred(VALUE num)
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl)
void rb_gc_resurrect(VALUE ptr)
VALUE rb_float_new_in_heap(double)
int rb_backtrace_p(VALUE obj)
static VALUE rb_float_new_inline(double d)
int rb_obj_basic_to_s_p(VALUE)
VALUE rb_invcmp(VALUE, VALUE)
VALUE rb_backtrace_to_str_ary(VALUE obj)
VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase)
VALUE rb_int_succ(VALUE num)
unsigned close_others_given
VALUE rb_get_load_path(void)
VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg)
VALUE rb_hash_keys(VALUE hash)
void rb_last_status_clear(void)
size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc, const struct vtm *vtm, VALUE timev, int gmt)
unsigned long rb_serial_t
static int chfunc(void *data, char *errbuf, size_t errbuf_len)
int rb_get_next_signal(void)
VALUE rb_big_mul_toom3(VALUE x, VALUE y)
int rb_is_const_name(VALUE name)
VALUE rb_math_atan2(VALUE, VALUE)
void rb_execarg_fixup(VALUE execarg_obj)
void rb_print_backtrace(void)
#define RUBY_SYMBOL_EXPORT_END
void rb_mark_end_proc(void)
void rb_thread_execute_interrupts(VALUE th)
VALUE rb_thread_shield_destroy(VALUE self)
void rb_call_end_proc(VALUE data)
unsigned char buf[MIME_BUF_SIZE]
void rb_vm_pop_cfunc_frame(void)
const signed char ruby_digit36_to_number_table[]
unsigned new_pgroup_given
static int options(unsigned char *cp)
VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj)
VALUE rb_integer_float_eq(VALUE x, VALUE y)
int rb_bug_reporter_add(void(*func)(FILE *, void *), void *data)
VALUE rb_get_backtrace(VALUE info)
void rb_obj_copy_ivar(VALUE dest, VALUE obj)
VALUE rb_str2big_normal(VALUE arg, int base, int badcheck)
#define RUBY_SYMBOL_EXPORT_BEGIN
void Init_native_thread(void)
void ruby_mimfree(void *ptr)
int rb_is_class_name(VALUE name)
void rb_thread_mark(void *th)
VALUE rb_math_cosh(VALUE)
int rb_sigaltstack_size(void)
st_table * st_init_numtable(void)
VALUE rb_uninterruptible(VALUE(*b_proc)(ANYARGS), VALUE data)
VALUE rb_blocking_function_t(void *)
VALUE rb_block_clear_env_self(VALUE proc)
void rb_class_detach_module_subclasses(VALUE)
static int nlz_int(unsigned int x)
void rb_write_error_str(VALUE mesg)
char conflict[sizeof(VALUE) *3]
void rb_thread_recycle_stack_release(VALUE *)
struct rb_execarg::@123::@125 cmd
VALUE rb_thread_shield_new(void)
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p)
VALUE rb_make_backtrace(void)
void rb_mark_generic_ivar(VALUE)
void rb_fiber_reset_root_local_storage(VALUE)
VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck)
void rb_gc_writebarrier_remember_promoted(VALUE obj)
void ruby_gc_set_params(int safe_level)
VALUE rb_int_positive_pow(long x, unsigned long y)
struct rb_execarg::@123::@124 sh
VALUE rb_rational_reciprocal(VALUE x)
void rb_ary_delete_same(VALUE, VALUE)
unsigned long rb_event_flag_t
size_t rb_obj_memsize_of(VALUE)
VALUE rb_execarg_init(int argc, VALUE *argv, int accept_shell, VALUE execarg_obj)
VALUE rb_big_sq_fast(VALUE x)
VALUE rb_gcd_normal(VALUE self, VALUE other)
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
st_table * rb_st_copy(VALUE obj, struct st_table *orig_tbl)
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_obj_methods(int argc, VALUE *argv, VALUE obj)
int rb_is_local_name(VALUE name)
VALUE rb_iseq_label(VALUE iseqval)
VALUE rb_get_expanded_load_path(void)
static unsigned int hash(const char *str, unsigned int len)
VALUE rb_vm_top_self(void)
size_t rb_obj_gc_flags(VALUE, ID[], size_t)
VALUE rb_iseq_method_name(VALUE self)
void ruby_kill(rb_pid_t pid, int sig)
VALUE rb_thread_shield_wait(VALUE self)
int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val)
VALUE rb_big2str_poweroftwo(VALUE x, int base)
void rb_gc_mark_global_tbl(void)
static double rb_float_value_inline(VALUE v)
rb_serial_t rb_next_class_serial(void)
VALUE rb_dbl_hash(double d)
VALUE rb_execarg_new(int argc, VALUE *argv, int accept_shell)
struct timeval rb_time_timeval(VALUE)
rb_alloc_func_t allocator
VALUE rb_home_dir_of(VALUE user, VALUE result)
int rb_parse_in_eval(void)
void rb_backtrace_print_as_bugreport(void)
int rb_num_to_uint(VALUE val, unsigned int *ret)
VALUE rb_math_hypot(VALUE, VALUE)
void rb_stdio_set_default_encoding(void)
st_index_t rb_hash_proc(st_index_t hash, VALUE proc)
VALUE rb_get_path_check_to_string(VALUE, int)
int rb_parse_in_main(void)
VALUE rb_vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval)
void rb_clear_trace_func(void)
VALUE(* rb_alloc_func_t)(VALUE)
VALUE rb_integer_float_cmp(VALUE x, VALUE y)
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
int rb_is_junk_name(VALUE name)
RUBY_SYMBOL_EXPORT_BEGIN const char * rb_objspace_data_type_name(VALUE obj)
VALUE rb_big_uminus(VALUE x)
void rb_objspace_set_event_hook(const rb_event_flag_t event)
void rb_maygvl_fd_fix_cloexec(int fd)
VALUE rb_mutex_owned_p(VALUE self)
#define RB_OBJ_WRITE(a, slot, b)
VALUE rb_sourcefilename(void)
const char * rb_builtin_type_name(int t)
VALUE rb_obj_is_fiber(VALUE)
VALUE rb_big_divrem_normal(VALUE x, VALUE y)
ssize_t rb_io_bufread(VALUE io, void *buf, size_t size)
VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
static int nlz_long(unsigned long x)
int rb_is_attrset_name(VALUE name)
PRINTF_ARGS(void ruby_debug_printf(const char *,...), 1, 2)
void Init_eval_method(void)