15 #define RUBY_INTERN_H 1
17 #if defined(__cplusplus)
26 #include RUBY_EXTCONF_H
29 #ifdef HAVE_STDARG_PROTOTYPES
35 #if defined(HAVE_SYS_TYPES_H)
36 #include <sys/types.h>
39 #if defined(HAVE_SYS_TIME_H)
45 #if defined __GNUC__ && __GNUC__ >= 4
46 #pragma GCC visibility push(default)
54 #define ID_ALLOCATOR 1
115 #define rb_big2int(x) rb_big2long(x)
117 #define rb_big2uint(x) rb_big2ulong(x)
120 VALUE rb_ll2inum(LONG_LONG);
121 VALUE rb_ull2inum(
unsigned LONG_LONG);
122 LONG_LONG rb_big2ll(
VALUE);
123 unsigned LONG_LONG rb_big2ull(
VALUE);
150 #define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
151 #define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
153 #define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
154 #define rb_rational_new2(x,y) rb_rational_new((x), (y))
156 #define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
157 #define rb_Rational2(x,y) rb_Rational((x), (y))
160 #define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
161 #define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
163 #define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
164 #define rb_complex_new2(x,y) rb_complex_new((x), (y))
167 #define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
168 #define rb_Complex2(x,y) rb_Complex((x), (y))
210 #define RETURN_ENUMERATOR(obj, argc, argv) do { \
211 if (!rb_block_given_p()) \
212 return rb_enumeratorize((obj), ID2SYM(rb_frame_this_func()),\
228 #define rb_check_frozen_internal(obj) do { \
229 VALUE frozen_obj = (obj); \
230 if (OBJ_FROZEN(frozen_obj)) { \
231 rb_error_frozen(rb_obj_classname(frozen_obj)); \
235 #define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
242 #define rb_check_frozen(obj) rb_check_frozen_inline(obj)
250 #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
266 #define rb_fd_ptr(f) ((f)->fdset)
267 #define rb_fd_max(f) ((f)->maxfd)
269 #elif defined(_WIN32)
278 #define rb_fd_zero(f) ((f)->fdset->fd_count = 0)
280 #define rb_fd_clr(n, f) rb_w32_fdclr((n), (f)->fdset)
281 #define rb_fd_isset(n, f) rb_w32_fdisset((n), (f)->fdset)
282 #define rb_fd_copy(d, s, n) rb_w32_fd_copy((d), (s), (n))
284 #define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s))
286 #define rb_fd_select(n, rfds, wfds, efds, timeout) rb_w32_select((n), (rfds) ? ((rb_fdset_t*)(rfds))->fdset : NULL, (wfds) ? ((rb_fdset_t*)(wfds))->fdset : NULL, (efds) ? ((rb_fdset_t*)(efds))->fdset: NULL, (timeout))
287 #define rb_fd_resize(n, f) ((void)(f))
289 #define rb_fd_ptr(f) ((f)->fdset)
290 #define rb_fd_max(f) ((f)->fdset->fd_count)
295 #define rb_fd_zero(f) FD_ZERO(f)
296 #define rb_fd_set(n, f) FD_SET((n), (f))
297 #define rb_fd_clr(n, f) FD_CLR((n), (f))
298 #define rb_fd_isset(n, f) FD_ISSET((n), (f))
299 #define rb_fd_copy(d, s, n) (*(d) = *(s))
300 #define rb_fd_dup(d, s) (*(d) = *(s))
301 #define rb_fd_resize(n, f) ((void)(f))
302 #define rb_fd_ptr(f) (f)
303 #define rb_fd_init(f) FD_ZERO(f)
304 #define rb_fd_init_copy(d, s) (*(d) = *(s))
305 #define rb_fd_term(f) ((void)(f))
306 #define rb_fd_max(f) FD_SETSIZE
307 #define rb_fd_select(n, rfds, wfds, efds, timeout) select((n), (rfds), (wfds), (efds), (timeout))
317 #define rb_disable_super(klass, name) ((void)0)
318 #define rb_enable_super(klass, name) ((void)0)
319 #define HAVE_RB_DEFINE_ALLOC_FUNC 1
446 #define Init_stack(addr) ruby_init_stack(addr)
470 #define rb_defout rb_stdout
500 #define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
508 #define RB_NUM_COERCE_FUNCS_NEED_OPID 1
590 rb_pid_t
rb_fork_err(
int*,
int (*)(
void*,
char*,
size_t),
void*,
VALUE,
char*,
size_t);
612 #define rb_memcmp memcmp
622 #define HAVE_RB_REG_NEW_STR 1
631 #define rb_argv rb_get_argv()
645 #define posix_signal ruby_posix_signal
699 #define rb_str_dup_frozen rb_str_new_frozen
719 #define rb_hash_uint32(h, i) st_hash_uint32((h), (i))
720 #define rb_hash_uint(h, i) st_hash_uint((h), (i))
721 #define rb_hash_end(h) st_hash_end(h)
743 #if defined(__GNUC__) && !defined(__PCC__)
744 #define rb_str_new_cstr(str) __extension__ ( \
746 (__builtin_constant_p(str)) ? \
747 rb_str_new((str), (long)strlen(str)) : \
748 rb_str_new_cstr(str); \
750 #define rb_tainted_str_new_cstr(str) __extension__ ( \
752 (__builtin_constant_p(str)) ? \
753 rb_tainted_str_new((str), (long)strlen(str)) : \
754 rb_tainted_str_new_cstr(str); \
756 #define rb_usascii_str_new_cstr(str) __extension__ ( \
758 (__builtin_constant_p(str)) ? \
759 rb_usascii_str_new((str), (long)strlen(str)) : \
760 rb_usascii_str_new_cstr(str); \
762 #define rb_external_str_new_cstr(str) __extension__ ( \
764 (__builtin_constant_p(str)) ? \
765 rb_external_str_new((str), (long)strlen(str)) : \
766 rb_external_str_new_cstr(str); \
768 #define rb_locale_str_new_cstr(str) __extension__ ( \
770 (__builtin_constant_p(str)) ? \
771 rb_locale_str_new((str), (long)strlen(str)) : \
772 rb_locale_str_new_cstr(str); \
774 #define rb_str_buf_new_cstr(str) __extension__ ( \
776 (__builtin_constant_p(str)) ? \
777 rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), \
778 (str), (long)strlen(str)) : \
779 rb_str_buf_new_cstr(str); \
781 #define rb_str_buf_cat2(str, ptr) __extension__ ( \
783 (__builtin_constant_p(ptr)) ? \
784 rb_str_buf_cat((str), (ptr), (long)strlen(ptr)) : \
785 rb_str_buf_cat2((str), (ptr)); \
787 #define rb_str_cat2(str, ptr) __extension__ ( \
789 (__builtin_constant_p(ptr)) ? \
790 rb_str_cat((str), (ptr), (long)strlen(ptr)) : \
791 rb_str_cat2((str), (ptr)); \
793 #define rb_exc_new2(klass, ptr) __extension__ ( \
795 (__builtin_constant_p(ptr)) ? \
796 rb_exc_new((klass), (ptr), (long)strlen(ptr)) : \
797 rb_exc_new2((klass), (ptr)); \
800 #define rb_str_new2 rb_str_new_cstr
801 #define rb_str_new3 rb_str_new_shared
802 #define rb_str_new4 rb_str_new_frozen
803 #define rb_str_new5 rb_str_new_with_class
804 #define rb_tainted_str_new2 rb_tainted_str_new_cstr
805 #define rb_str_buf_new2 rb_str_buf_new_cstr
806 #define rb_usascii_str_new2 rb_usascii_str_new_cstr
827 #define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
828 #define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
913 #if defined __GNUC__ && __GNUC__ >= 4
914 #pragma GCC visibility pop
917 #if defined(__cplusplus)
char * rb_path_skip_prefix(const char *path)
VALUE rb_thread_blocking_region(rb_blocking_function_t *func, void *data1, rb_unblock_function_t *ubf, void *data2)
VALUE(* rb_alloc_func_t)(VALUE)
VALUE rb_apply(VALUE, ID, VALUE)
Calls a method.
VALUE rb_big_modulo(VALUE x, VALUE y)
struct timeval rb_time_interval(VALUE num)
int rb_provided(const char *)
VALUE rb_mutex_lock(VALUE mutex)
void rb_gc_finalize_deferred(void)
int rb_bigzero_p(VALUE x)
VALUE rb_cvar_get(VALUE, ID)
VALUE rb_ary_unshift(VALUE ary, VALUE item)
void rb_thread_atfork_before_exec(void)
VALUE rb_big_clone(VALUE x)
VALUE rb_io_addstr(VALUE, VALUE)
void ruby_set_stack_size(size_t)
VALUE rb_reg_match_last(VALUE)
int rb_reg_backref_number(VALUE match, VALUE backref)
VALUE rb_define_module_id_under(VALUE outer, ID id)
VALUE rb_exc_new(VALUE etype, const char *ptr, long len)
void rb_thread_atfork(void)
VALUE rb_struct_iv_get(VALUE c, const char *name)
VALUE rb_ary_pop(VALUE ary)
VALUE rb_ary_new4(long n, const VALUE *elts)
VALUE rb_str_length(VALUE)
VALUE rb_mod_include_p(VALUE mod, VALUE mod2)
VALUE rb_ary_entry(VALUE ary, long offset)
VALUE rb_num_coerce_bin(VALUE, VALUE, ID)
VALUE rb_uint2big(VALUE n)
void rb_compile_error(const char *file, int line, const char *fmt,...)
VALUE rb_detach_process(rb_pid_t pid)
VALUE rb_str_equal(VALUE str1, VALUE str2)
void rb_cv_set(VALUE, const char *, VALUE)
void rb_check_inheritable(VALUE super)
Ensures a class can be derived from super.
VALUE rb_obj_id(VALUE obj)
#define rb_gc_mark_locations(start, end)
void rb_update_max_fd(int fd)
VALUE rb_ary_freeze(VALUE ary)
VALUE rb_make_exception(int argc, VALUE *argv)
void rb_backref_set(VALUE)
VALUE rb_time_nano_new(time_t, long)
VALUE rb_Rational(VALUE, VALUE)
VALUE rb_io_get_io(VALUE)
VALUE rb_hash_dup(VALUE hash)
VALUE rb_range_new(VALUE, VALUE, int)
VALUE rb_big_xor(VALUE xx, VALUE yy)
void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
int rb_is_absolute_path(const char *path)
void ruby_prog_init(void)
VALUE rb_big2ulong(VALUE x)
void rb_undef_alloc_func(VALUE)
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
int ruby_cleanup(volatile int ex)
return rb_hash_delete(CALLBACK_TABLE, rb_str_new2(RSTRING_PTR(cmd_id)+head_len))
VALUE rb_barrier_new(void)
VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
VALUE rb_f_sprintf(int, const VALUE *)
VALUE rb_ary_reverse(VALUE)
VALUE rb_ary_sort(VALUE ary)
int rb_obj_method_arity(VALUE, ID)
#define rb_usascii_str_new2
VALUE rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod)
VALUE rb_ary_subseq(VALUE ary, long beg, long len)
void rb_file_const(const char *name, VALUE value)
void rb_define_class_variable(VALUE, const char *, VALUE)
VALUE rb_str_cat(VALUE, const char *, long)
VALUE rb_define_class_id_under(VALUE outer, ID id, VALUE super)
Defines a class under the namespace of outer.
void rb_unblock_function_t(void *)
VALUE rb_ary_delete_at(VALUE ary, long pos)
VALUE rb_f_notimplement(int argc, VALUE *argv, VALUE obj)
#define rb_str_dup_frozen
SSL_METHOD *(* func)(void)
int rb_find_file_ext(VALUE *filep, const char *const *ext)
void rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
rb_hash_aset(CALLBACK_TABLE, id_num, cmd)
void ruby_show_version(void)
void rb_exec_end_proc(void)
void rb_error_frozen(const char *what)
VALUE rb_proc_call_with_block(VALUE, int argc, VALUE *argv, VALUE)
VALUE rb_mod_class_variables(VALUE)
VALUE rb_ary_shift(VALUE ary)
int rb_env_path_tainted(void)
VALUE rb_mod_ancestors(VALUE mod)
VALUE rb_ary_each(VALUE array)
VALUE rb_big_eql(VALUE x, VALUE y)
VALUE rb_big_plus(VALUE x, VALUE y)
void rb_write_error2(const char *, long)
VALUE rb_complex_polar(VALUE x, VALUE y)
VALUE rb_dbl_cmp(double, double)
VALUE rb_method_call(int, VALUE *, VALUE)
struct st_table * rb_generic_ivar_table(VALUE)
#define rb_check_frozen_internal(obj)
VALUE rb_str_unlocktmp(VALUE)
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
ID rb_frame_this_func(void)
VALUE rb_str_new_with_class(VALUE, const char *, long)
void rb_mem_clear(register VALUE *mem, register long size)
void rb_autoload(VALUE, ID, const char *)
void ruby_init_loadpath(void)
VALUE rb_struct_alloc_noinit(VALUE)
VALUE rb_reg_match(VALUE, VALUE)
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
VALUE rb_struct_new(VALUE,...)
VALUE rb_ary_push(VALUE ary, VALUE item)
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
VALUE rb_reg_nth_defined(int, VALUE)
void rb_cvar_set(VALUE, ID, VALUE)
VALUE rb_singleton_class_clone(VALUE obj)
VALUE rb_str_concat(VALUE, VALUE)
int rb_thread_alone(void)
VALUE rb_obj_is_method(VALUE)
st_index_t rb_memhash(const void *ptr, long len)
VALUE rb_io_ungetc(VALUE, VALUE)
VALUE rb_str_plus(VALUE, VALUE)
VALUE rb_ary_rassoc(VALUE ary, VALUE value)
VALUE rb_fiber_yield(int argc, VALUE *argv)
VALUE rb_mod_init_copy(VALUE clone, VALUE orig)
#define rb_hash_uint32(h, i)
VALUE rb_ary_tmp_new(long capa)
VALUE rb_file_s_expand_path(int argc, VALUE *argv)
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *)
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
double rb_genrand_real(void)
VALUE rb_str_times(VALUE, VALUE)
VALUE rb_path_to_class(VALUE)
struct st_table * rb_hash_tbl(VALUE hash)
VALUE rb_protect(VALUE(*proc)(VALUE), VALUE data, int *state)
VALUE rb_fiber_alive_p(VALUE fibval)
VALUE rb_big_and(VALUE xx, VALUE yy)
int rb_reg_options(VALUE)
VALUE rb_backref_get(void)
VALUE rb_str_associated(VALUE)
void rb_gc_mark_trap_list(void)
VALUE rb_quad_unpack(const char *buf, int sign)
VALUE rb_ivar_get(VALUE, ID)
void rb_str_update(VALUE, long, long, VALUE)
VALUE rb_fiber_current(void)
VALUE rb_mod_module_eval(int, VALUE *, VALUE)
VALUE rb_io_getbyte(VALUE)
VALUE rb_ary_clear(VALUE ary)
VALUE rb_convert_type(VALUE, int, const char *, const char *)
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
VALUE rb_obj_is_kind_of(VALUE, VALUE)
int rb_const_defined(VALUE, ID)
VALUE rb_reg_match2(VALUE)
st_index_t rb_str_hash(VALUE)
VALUE rb_ary_new3(long n,...)
void rb_syswait(rb_pid_t pid)
VALUE rb_check_to_float(VALUE)
int rb_feature_provided(const char *, const char **)
VALUE rb_range_beg_len(VALUE, long *, long *, long, int)
double rb_big2dbl(VALUE x)
double rb_str_to_dbl(VALUE, int)
VALUE rb_reg_match_post(VALUE)
VALUE rb_io_write(VALUE, VALUE)
VALUE rb_tainted_str_new_cstr(const char *)
int rb_str_cmp(VALUE, VALUE)
VALUE rb_file_open_str(VALUE, const char *)
void rb_define_protected_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
VALUE rb_hash_fetch(VALUE hash, VALUE key)
void rb_big_resize(VALUE big, long len)
VALUE rb_big_unpack(unsigned long *buf, long num_longs)
VALUE rb_big_new(long len, int sign)
rb_alias(klass, key_id, value_id)
VALUE rb_path2class(const char *)
VALUE rb_proc_times(VALUE)
VALUE rb_struct_getmember(VALUE, ID)
VALUE rb_str_tmp_new(long)
VALUE rb_check_to_integer(VALUE, const char *)
VALUE rb_obj_untrust(VALUE)
int rb_const_defined_from(VALUE, ID)
void rb_loaderror(const char *fmt,...)
VALUE rb_str_buf_append(VALUE, VALUE)
int rb_cmpint(VALUE val, VALUE a, VALUE b)
VALUE rb_sym_all_symbols(void)
VALUE rb_mod_module_exec(int, VALUE *, VALUE)
VALUE rb_fix2str(VALUE, int)
VALUE rb_ivar_defined(VALUE, ID)
VALUE rb_mod_remove_cvar(VALUE, VALUE)
VALUE rb_reg_last_match(VALUE)
RUBY_EXTERN char * ruby_sourcefile
VALUE rb_external_str_new_cstr(const char *)
void rb_ivar_foreach(VALUE, int(*)(ANYARGS), st_data_t)
void rb_gc_force_recycle(VALUE p)
struct timespec rb_time_timespec(VALUE time)
VALUE rb_thread_local_aref(VALUE, ID)
VALUE rb_str_buf_cat(VALUE, const char *, long)
void rb_name_error(ID id, const char *fmt,...)
VALUE rb_obj_untaint(VALUE)
void rb_thread_fd_close(int)
#define rb_fd_isset(n, f)
void * rb_load_file(const char *)
VALUE rb_enumeratorize(VALUE obj, VALUE meth, int argc, VALUE *argv)
rb_pid_t rb_fork(int *, int(*)(void *), void *, VALUE)
void rb_exc_raise(VALUE mesg)
VALUE rb_struct_members(VALUE)
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
int rb_is_const_id(ID id)
int rb_is_instance_id(ID id)
void rb_reset_random_seed(void)
VALUE rb_ary_assoc(VALUE ary, VALUE key)
VALUE rb_mutex_locked_p(VALUE mutex)
VALUE rb_struct_s_members(VALUE)
return rb_str_append(rb_str_new2(cmd_id_head), id_num)
void rb_write_error(const char *)
VALUE rb_binding_new(void)
VALUE rb_file_open(const char *, const char *)
VALUE rb_thread_kill(VALUE)
sighandler_t posix_signal(int signum, sighandler_t handler)
VALUE rb_big2ulong_pack(VALUE x)
VALUE rb_big_divmod(VALUE x, VALUE y)
int rb_thread_fd_writable(int)
VALUE rb_rational_raw(VALUE, VALUE)
VALUE rb_obj_method(VALUE, VALUE)
VALUE rb_lastline_get(void)
RUBY_EXTERN VALUE rb_output_rs
void rb_free_generic_ivar(VALUE)
void rb_str_setter(VALUE, ID, VALUE *)
VALUE rb_cvar_defined(VALUE, ID)
VALUE rb_class_inherited(VALUE super, VALUE klass)
Calls Class::inherited.
VALUE rb_fiber_resume(VALUE fibval, int argc, VALUE *argv)
void rb_thread_sleep(int)
void rb_ary_free(VALUE ary)
void rb_mark_end_proc(void)
VALUE rb_marshal_dump(VALUE, VALUE)
VALUE rb_find_file(VALUE path)
VALUE rb_class_new_instance(int, VALUE *, VALUE)
VALUE rb_f_exit(int, VALUE *)
char * rb_path_last_separator(const char *path)
VALUE rb_class_name(VALUE)
rb_pid_t rb_spawn_err(int, VALUE *, char *, size_t)
void ruby_incpush(const char *)
VALUE rb_dbl2big(double d)
VALUE rb_big_eq(VALUE x, VALUE y)
void * rb_mod_const_at(VALUE, void *)
void rb_compile_error_append(const char *fmt,...)
void rb_compile_error_with_enc(const char *file, int line, void *enc, const char *fmt,...)
VALUE rb_str_new_shared(VALUE)
VALUE rb_obj_taint(VALUE)
int rb_proc_exec(const char *)
void rb_gc_copy_finalizer(VALUE dest, VALUE obj)
VALUE rb_str_encode_ospath(VALUE path)
VALUE rb_str_substr(VALUE, long, long)
VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
VALUE rb_block_lambda(void)
VALUE rb_obj_tainted(VALUE)
VALUE rb_str_to_inum(VALUE str, int base, int badcheck)
void rb_attr(VALUE, ID, int, int, int)
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
const char * ruby_signal_name(int)
VALUE rb_time_succ(VALUE)
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
VALUE rb_class_real(VALUE)
VALUE rb_ary_replace(VALUE copy, VALUE orig)
VALUE rb_str_cat2(VALUE, const char *)
int rb_run_exec_options_err(const struct rb_exec_arg *e, struct rb_exec_arg *s, char *, size_t)
VALUE rb_obj_as_string(VALUE)
void rb_clear_cache_by_class(VALUE)
VALUE rb_str_buf_cat2(VALUE, const char *)
VALUE rb_big_cmp(VALUE x, VALUE y)
VALUE rb_f_require(VALUE, VALUE)
VALUE rb_thread_current(void)
VALUE rb_iv_get(VALUE, const char *)
VALUE rb_locale_str_new(const char *, long)
VALUE rb_ary_to_s(VALUE ary)
int ruby_stack_check(void)
void rb_w32_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
VALUE rb_barrier_wait(VALUE self)
void rb_mark_generic_ivar_tbl(void)
void rb_ary_store(VALUE ary, long idx, VALUE val)
void rb_remove_method_id(VALUE, ID)
#define PRINTF_ARGS(decl, string_index, first_to_check)
void rb_str_associate(VALUE, VALUE)
VALUE rb_define_module_id(ID id)
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
void rb_lastline_set(VALUE)
VALUE rb_fiber_new(VALUE(*func)(ANYARGS), VALUE obj)
VALUE rb_class_inherited_p(VALUE, VALUE)
VALUE rb_require_safe(VALUE, int)
VALUE rb_external_str_new(const char *, long)
VALUE rb_rational_new(VALUE, VALUE)
VALUE rb_mutex_trylock(VALUE mutex)
int rb_uv_to_utf8(char[6], unsigned long)
#define range(low, item, hi)
static void rb_check_frozen_inline(VALUE obj)
unsigned char buf[MIME_BUF_SIZE]
rb_alloc_func_t rb_get_alloc_func(VALUE)
double rb_random_real(VALUE rnd)
VALUE rb_barrier_release(VALUE self)
VALUE rb_obj_alloc(VALUE)
VALUE rb_class_get_superclass(VALUE)
VALUE rb_str_split(VALUE, const char *)
SIGNED_VALUE rb_big2long(VALUE x)
VALUE rb_class_superclass(VALUE)
VALUE rb_mod_constants(int, VALUE *, VALUE)
VALUE rb_struct_aset(VALUE, VALUE, VALUE)
void rb_gc_mark_global_tbl(void)
VALUE rb_find_file_safe(VALUE path, int safe_level)
VALUE rb_obj_init_copy(VALUE, VALUE)
void rb_num_zerodiv(void)
VALUE rb_reg_init_str(VALUE re, VALUE s, int options)
void rb_gc_mark_symbols(void)
VALUE rb_big2str(VALUE x, int base)
VALUE rb_thread_wakeup_alive(VALUE)
VALUE rb_time_new(time_t, long)
VALUE rb_make_backtrace(void)
VALUE rb_str_resurrect(VALUE str)
VALUE rb_file_absolute_path(VALUE fname, VALUE dname)
void rb_remove_method(VALUE, const char *)
rb_pid_t rb_fork_err(int *, int(*)(void *, char *, size_t), void *, VALUE, char *, size_t)
VALUE rb_str_resize(VALUE, long)
VALUE rb_io_binmode(VALUE)
size_t rb_str_capacity(VALUE)
long rb_str_offset(VALUE, long)
void rb_load_fail(const char *path)
VALUE rb_const_get(VALUE, ID)
int rb_str_hash_cmp(VALUE, VALUE)
void st_foreach_safe(st_table *table, int(*func)(ANYARGS), st_data_t a)
VALUE rb_ary_to_ary(VALUE obj)
VALUE rb_thread_local_aset(VALUE, ID, VALUE)
int rb_exec(const struct rb_exec_arg *)
VALUE rb_str_subseq(VALUE, long, long)
VALUE rb_f_abort(int, VALUE *)
int rb_thread_select(int max, fd_set *read, fd_set *write, fd_set *except, struct timeval *timeout)
VALUE rb_big_minus(VALUE x, VALUE y)
void rb_alias_variable(ID, ID)
VALUE rb_locale_str_new_cstr(const char *)
VALUE rb_str_replace(VALUE, VALUE)
VALUE rb_io_fdopen(int, int, const char *)
return rb_eval_cmd(cmd, rest, 0)
VALUE rb_reg_new(const char *, long, int)
unsigned long rb_genrand_ulong_limited(unsigned long i)
int rb_symname_p(const char *name)
VALUE rb_obj_is_proc(VALUE)
VALUE rb_check_funcall(VALUE, ID, int, VALUE *)
VALUE rb_sprintf(const char *format,...)
VALUE rb_file_s_absolute_path(int argc, VALUE *argv)
VALUE rb_big_div(VALUE x, VALUE y)
VALUE rb_random_bytes(VALUE rnd, long n)
VALUE rb_str_format(int, const VALUE *, VALUE)
VALUE rb_big_idiv(VALUE x, VALUE y)
int rb_obj_respond_to(VALUE, ID, int)
#define rb_fd_copy(d, s, n)
void rb_ary_modify(VALUE ary)
void rb_last_status_set(int status, rb_pid_t pid)
VALUE rb_ary_delete(VALUE ary, VALUE item)
int rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s)
VALUE rb_class_path(VALUE)
VALUE rb_str_vcatf(VALUE, const char *, va_list)
VALUE rb_file_dirname(VALUE fname)
VALUE rb_iv_set(VALUE, const char *, VALUE)
void * rb_mod_const_of(VALUE, void *)
int rb_is_local_id(ID id)
void rb_str_modify_expand(VALUE, long)
VALUE rb_check_hash_type(VALUE hash)
VALUE rb_assoc_new(VALUE car, VALUE cdr)
VALUE rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE(*func)(VALUE, long))
void rb_thread_wait_fd(int)
VALUE rb_thread_main(void)
VALUE rb_file_directory_p(VALUE obj, VALUE fname)
int rb_str_comparable(VALUE, VALUE)
VALUE rb_exc_new2(VALUE etype, const char *s)
void rb_clear_cache(void)
VALUE rb_const_list(void *)
VALUE rb_f_exec(int, VALUE *)
VALUE rb_big_mul(VALUE x, VALUE y)
void rb_name_class(VALUE, ID)
void rb_mark_tbl(st_table *tbl)
VALUE rb_make_metaclass(VALUE obj, VALUE unused)
rb_hash_foreach(tbl, each_attr_def, self)
void rb_mark_generic_ivar(VALUE)
register unsigned int len
void rb_match_busy(VALUE)
VALUE rb_gc_disable(void)
VALUE rb_random_int(VALUE rnd, VALUE max)
VALUE rb_Complex(VALUE x, VALUE y)
VALUE rb_num_coerce_relop(VALUE, VALUE, ID)
VALUE rb_cv_get(VALUE, const char *)
int rb_sym_interned_p(VALUE)
VALUE rb_str_ellipsize(VALUE, long)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
VALUE rb_str_new_cstr(const char *)
VALUE rb_proc_call(VALUE, VALUE)
VALUE rb_proc_lambda_p(VALUE)
#define rb_tainted_str_new2
VALUE rb_blocking_function_t(void *)
VALUE rb_io_ungetbyte(VALUE, VALUE)
VALUE rb_complex_new(VALUE x, VALUE y)
VALUE rb_obj_remove_instance_variable(VALUE, VALUE)
void rb_jump_tag(int tag)
int rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val)
int rb_reserved_fd_p(int fd)
VALUE rb_hash_freeze(VALUE hash)
VALUE rb_class_instance_methods(int argc, VALUE *argv, VALUE mod)
void rb_set_end_proc(void(*func)(VALUE), VALUE data)
int rb_respond_to(VALUE, ID)
VALUE rb_str_freeze(VALUE)
void rb_gc_set_params(void)
char * rb_path_next(const char *path)
VALUE rb_float_new(double)
RUBY_EXTERN VALUE rb_default_rs
VALUE rb_obj_is_instance_of(VALUE, VALUE)
VALUE rb_obj_trust(VALUE)
VALUE rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
void rb_str_modify(VALUE)
VALUE rb_ary_resize(VALUE ary, long len)
expands or shrinks ary to len elements.
int rb_const_defined_at(VALUE, ID)
int rb_proc_exec_n(int, VALUE *, const char *)
void rb_define_method_id(VALUE klass, ID mid, VALUE(*func)(ANYARGS), int argc)
void rb_gc_mark_parser(void)
VALUE rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
void rb_singleton_class_attached(VALUE klass, VALUE obj)
Attach a object to a singleton class.
void * ruby_process_options(int, char **)
VALUE rb_hash_lookup2(VALUE hash, VALUE key, VALUE def)
VALUE rb_str2inum(VALUE str, int base)
VALUE rb_module_new(void)
int rb_path_check(const char *path)
VALUE rb_exc_new3(VALUE etype, VALUE str)
VALUE rb_check_convert_type(VALUE, int, const char *, const char *)
VALUE rb_block_proc(void)
VALUE rb_ary_plus(VALUE x, VALUE y)
VALUE rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
VALUE rb_str_buf_cat_ascii(VALUE, const char *)
VALUE rb_file_expand_path(VALUE fname, VALUE dname)
void ruby_sig_finalize(void)
VALUE rb_str_buf_new_cstr(const char *)
char * rb_path_end(const char *path)
void rb_mark_set(st_table *tbl)
VALUE rb_check_array_type(VALUE ary)
VALUE rb_struct_aref(VALUE, VALUE)
VALUE rb_complex_raw(VALUE x, VALUE y)
size_t ruby_stack_length(VALUE **p)
VALUE rb_hash_aref(VALUE hash, VALUE key)
VALUE rb_obj_frozen_p(VALUE)
#define rb_fd_select(n, rfds, wfds, efds, timeout)
VALUE rb_str_catf(VALUE str, const char *format,...)
void ruby_script(const char *)
int rb_exec_err(const struct rb_exec_arg *, char *, size_t)
const char * ruby_find_extname(const char *name, long *len)
rb_ivar_set(einfo, ID_at_interp, interp)
VALUE rb_check_string_type(VALUE)
VALUE rb_f_kill(int, VALUE *)
VALUE rb_io_ascii8bit_binmode(VALUE)
VALUE rb_big_norm(VALUE x)
VALUE rb_ary_includes(VALUE ary, VALUE item)
void rb_str_shared_replace(VALUE, VALUE)
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
VALUE rb_proc_new(VALUE(*)(ANYARGS), VALUE)
void rb_thread_check_ints(void)
VALUE rb_big_lshift(VALUE x, VALUE y)
#define rb_str_set_len(str, length)
VALUE rb_thread_run(VALUE)
VALUE rb_str_locktmp(VALUE)
VALUE rb_mod_remove_const(VALUE, VALUE)
VALUE rb_big_or(VALUE xx, VALUE yy)
VALUE rb_mutex_unlock(VALUE mutex)
VALUE rb_big2str0(VALUE x, int base, int trim)
VALUE rb_uint2inum(VALUE n)
int rb_method_basic_definition_p(VALUE, ID)
VALUE rb_mod_const_missing(VALUE, VALUE)
long rb_str_sublen(VALUE, long)
VALUE rb_ary_sort_bang(VALUE ary)
VALUE rb_f_global_variables(void)
VALUE rb_marshal_load(VALUE)
VALUE rb_big_pow(VALUE x, VALUE y)
void rb_gc_mark_threads(void)
VALUE rb_str_inspect(VALUE)
VALUE rb_ary_dup(VALUE ary)
VALUE rb_io_puts(int, VALUE *, VALUE)
void rb_exec_arg_fixup(struct rb_exec_arg *e)
const char * ruby_find_basename(const char *name, long *baselen, long *alllen)
VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
VALUE rb_ary_concat(VALUE x, VALUE y)
VALUE rb_int2big(SIGNED_VALUE n)
VALUE rb_ary_join(VALUE ary, VALUE sep)
VALUE rb_ary_new2(long capa)
VALUE rb_filesystem_str_new_cstr(const char *)
int rb_is_class_id(ID id)
VALUE rb_obj_untrusted(VALUE)
VALUE rb_const_get_at(VALUE, ID)
VALUE rb_reg_match_pre(VALUE)
rb_const_set(self, ID_SUBST_INFO, cbsubst_obj)
void rb_set_class_path(VALUE, VALUE, const char *)
void rb_gc_mark_maybe(VALUE obj)
void rb_frozen_class_p(VALUE klass)
int rb_thread_interrupted(VALUE thval)
long rb_str_strlen(VALUE)
int rb_find_file_ext_safe(VALUE *filep, const char *const *ext, int safe_level)
VALUE rb_reg_new_str(VALUE, int)
int rb_file_load_ok(const char *path)
rb_thread_wakeup(param->thread)
VALUE rb_thread_stop(void)
VALUE rb_mod_included_modules(VALUE mod)
VALUE rb_str_new_frozen(VALUE)
VALUE rb_obj_instance_exec(int, VALUE *, VALUE)
VALUE rb_int2inum(SIGNED_VALUE n)
VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t,...)
VALUE rb_obj_instance_eval(int, VALUE *, VALUE)
VALUE rb_str_drop_bytes(VALUE, long)
VALUE rb_define_class_id(ID id, VALUE super)
Defines a new class.
void ruby_show_copyright(void)
VALUE rb_hash_delete_if(VALUE hash)
unsigned int rb_random_int32(VALUE rnd)
#define rb_check_frozen(obj)
VALUE rb_f_untrace_var(int, VALUE *)
void rb_big_2comp(VALUE x)
void rb_gc_call_finalizer_at_exit(void)
VALUE rb_str_intern(VALUE)
VALUE rb_obj_freeze(VALUE)
void rb_copy_generic_ivar(VALUE, VALUE)
VALUE rb_struct_define(const char *,...)
VALUE rb_big_rshift(VALUE x, VALUE y)
VALUE rb_ary_cmp(VALUE ary1, VALUE ary2)
VALUE rb_tainted_str_new(const char *, long)
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
VALUE rb_ary_resurrect(VALUE ary)
void rb_mark_hash(st_table *tbl)
VALUE rb_str_buf_new(long)
VALUE rb_usascii_str_new(const char *, long)
int rb_method_boundp(VALUE, ID, int)
VALUE rb_obj_instance_variables(VALUE)
VALUE rb_const_remove(VALUE, ID)
VALUE rb_f_trace_var(int, VALUE *)
VALUE rb_const_get_from(VALUE, ID)
VALUE rb_vsprintf(const char *, va_list)
VALUE rb_last_status_get(void)
void rb_exc_fatal(VALUE mesg)
VALUE rb_barrier_destroy(VALUE self)
VALUE rb_io_printf(int, VALUE *, VALUE)
VALUE rb_struct_initialize(VALUE, VALUE)
void ruby_default_signal(int)
void rb_thread_polling(void)
VALUE rb_thread_create(VALUE(*)(ANYARGS), void *)
void rb_obj_call_init(VALUE obj, int argc, VALUE *argv)
rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags)
VALUE rb_class_new(VALUE super)
Creates a new class.
static int match(VALUE str, VALUE pat, VALUE hash, int(*cb)(VALUE, VALUE))
void rb_quad_pack(char *buf, VALUE val)
unsigned int rb_genrand_int32(void)
VALUE rb_io_print(int, VALUE *, VALUE)
void rb_load_protect(VALUE, int, int *)
void rb_provide(const char *)
int rb_memcicmp(const void *, const void *, long)
VALUE rb_time_num_new(VALUE, VALUE)
void rb_invalid_str(const char *str, const char *type)
void ruby_set_argv(int, char **)
VALUE rb_class_boot(VALUE super)
A utility function that wraps class_alloc.
double rb_cstr_to_dbl(const char *, int)
st_index_t rb_ivar_count(VALUE)
VALUE rb_struct_alloc(VALUE, VALUE)
#define rb_hash_uint(h, i)
VALUE rb_autoload_load(VALUE, ID)
VALUE rb_cstr2inum(const char *str, int base)
void rb_set_class_path_string(VALUE, VALUE, VALUE)
void rb_cmperr(VALUE x, VALUE y)
st_index_t rb_hash_start(st_index_t)
VALUE rb_obj_clone(VALUE)
rb_pid_t rb_spawn(int, VALUE *)
VALUE rb_method_call_with_block(int, VALUE *, VALUE, VALUE)
VALUE rb_reg_nth_match(int, VALUE)
VALUE rb_attr_get(VALUE, ID)
VALUE rb_usascii_str_new_cstr(const char *)
VALUE rb_ary_aref(int argc, VALUE *argv, VALUE ary)
VALUE rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e)
struct timeval rb_time_timeval(VALUE)
RUBY_EXTERN int ruby_sourceline
VALUE rb_num_coerce_cmp(VALUE, VALUE, ID)
VALUE rb_filesystem_str_new(const char *, long)
RUBY_EXTERN VALUE rb_argv0
void rb_thread_sleep_forever(void)
VALUE rb_autoload_p(VALUE, ID)
VALUE rb_str_new(const char *, long)
VALUE rb_obj_class(VALUE)
int rb_mod_method_arity(VALUE, ID)