Ruby
2.7.2p137(2020-10-01revision5445e0435260b449decf2ac16f9d09bae3cafe72)
|
Go to the documentation of this file.
15 #define RUBY_INTERN_H 1
17 #if defined(__cplusplus)
24 #if !defined(__has_attribute)
25 #define __has_attribute(x) 0
30 #include RUBY_EXTCONF_H
33 #ifdef HAVE_STDARG_PROTOTYPES
45 # define MJIT_STATIC static
57 #define UNLIMITED_ARGUMENTS (-1)
103 #define rb_ary_new2 rb_ary_new_capa
104 #define rb_ary_new3 rb_ary_new_from_args
105 #define rb_ary_new4 rb_ary_new_from_values
119 #define rb_big2int(x) rb_big2long(x)
121 #define rb_big2uint(x) rb_big2ulong(x)
151 #define INTEGER_PACK_MSWORD_FIRST 0x01
152 #define INTEGER_PACK_LSWORD_FIRST 0x02
153 #define INTEGER_PACK_MSBYTE_FIRST 0x10
154 #define INTEGER_PACK_LSBYTE_FIRST 0x20
155 #define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
156 #define INTEGER_PACK_2COMP 0x80
157 #define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
159 #define INTEGER_PACK_FORCE_BIGNUM 0x100
160 #define INTEGER_PACK_NEGATIVE 0x200
162 #define INTEGER_PACK_LITTLE_ENDIAN \
163 (INTEGER_PACK_LSWORD_FIRST | \
164 INTEGER_PACK_LSBYTE_FIRST)
165 #define INTEGER_PACK_BIG_ENDIAN \
166 (INTEGER_PACK_MSWORD_FIRST | \
167 INTEGER_PACK_MSBYTE_FIRST)
176 #define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
177 #define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
179 #define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
180 #define rb_rational_new2(x,y) rb_rational_new((x), (y))
182 #define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
183 #define rb_Rational2(x,y) rb_Rational((x), (y))
190 #define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
191 #define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
193 #define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
194 #define rb_complex_new2(x,y) rb_complex_new((x), (y))
209 #define rb_complex_add rb_complex_plus
210 #define rb_complex_sub rb_complex_minus
211 #define rb_complex_nagate rb_complex_uminus
214 #define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
215 #define rb_Complex2(x,y) rb_Complex((x), (y))
260 #define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
261 rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn))
262 #define rb_enumeratorize_with_size_kw(obj, id, argc, argv, size_fn, kw_splat) \
263 rb_enumeratorize_with_size_kw(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn), kw_splat)
265 #define SIZED_ENUMERATOR(obj, argc, argv, size_fn) \
266 rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), \
267 (argc), (argv), (size_fn))
268 #define SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \
269 rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), \
270 (argc), (argv), (size_fn), (kw_splat))
271 #define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \
272 if (!rb_block_given_p()) \
273 return SIZED_ENUMERATOR(obj, argc, argv, size_fn); \
275 #define RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) do { \
276 if (!rb_block_given_p()) \
277 return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); \
279 #define RETURN_ENUMERATOR(obj, argc, argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
280 #define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
292 #define rb_exc_new2 rb_exc_new_cstr
293 #define rb_exc_new3 rb_exc_new_str
305 #define rb_check_frozen_internal(obj) do { \
306 VALUE frozen_obj = (obj); \
307 if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { \
308 rb_error_frozen_object(frozen_obj); \
312 #define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
319 #define rb_check_frozen(obj) rb_check_frozen_inline(obj)
325 #define rb_check_trusted(obj) rb_check_trusted_inline(obj)
329 #define RB_OBJ_INIT_COPY(obj, orig) \
330 ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
331 #define OBJ_INIT_COPY(obj, orig) RB_OBJ_INIT_COPY(obj, orig)
347 #define rb_check_arity rb_check_arity
349 #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
367 #define rb_fd_ptr(f) ((f)->fdset)
368 #define rb_fd_max(f) ((f)->maxfd)
370 #elif defined(_WIN32)
379 #define rb_fd_zero(f) ((f)->fdset->fd_count = 0)
381 #define rb_fd_clr(n, f) rb_w32_fdclr((n), (f)->fdset)
382 #define rb_fd_isset(n, f) rb_w32_fdisset((n), (f)->fdset)
383 #define rb_fd_copy(d, s, n) rb_w32_fd_copy((d), (s), (n))
385 #define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s))
396 #define rb_fd_resize(n, f) ((void)(f))
398 #define rb_fd_ptr(f) ((f)->fdset)
399 #define rb_fd_max(f) ((f)->fdset->fd_count)
404 #define rb_fd_zero(f) FD_ZERO(f)
405 #define rb_fd_set(n, f) FD_SET((n), (f))
406 #define rb_fd_clr(n, f) FD_CLR((n), (f))
407 #define rb_fd_isset(n, f) FD_ISSET((n), (f))
408 #define rb_fd_copy(d, s, n) (*(d) = *(s))
409 #define rb_fd_dup(d, s) (*(d) = *(s))
410 #define rb_fd_resize(n, f) ((void)(f))
411 #define rb_fd_ptr(f) (f)
412 #define rb_fd_init(f) FD_ZERO(f)
413 #define rb_fd_init_copy(d, s) (*(d) = *(s))
414 #define rb_fd_term(f) ((void)(f))
415 #define rb_fd_max(f) FD_SETSIZE
416 #define rb_fd_select(n, rfds, wfds, efds, timeout) select((n), (rfds), (wfds), (efds), (timeout))
426 #define HAVE_RB_DEFINE_ALLOC_FUNC 1
442 #if !defined(RUBY_EXPORT) && defined(_WIN32)
444 #define rb_f_notimplement (*rb_f_notimplement_)
556 #define st_foreach_safe rb_st_foreach_safe
582 #define rb_defout rb_stdout
617 #define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
626 #define RB_NUM_COERCE_FUNCS_NEED_OPID 1
714 #define rb_memcmp memcmp
724 #define HAVE_RB_REG_NEW_STR 1
733 #define rb_argv rb_get_argv()
741 #define posix_signal ruby_posix_signal
792 #define rb_str_dup_frozen rb_str_new_frozen
814 #define rb_hash_uint32(h, i) st_hash_uint32((h), (i))
815 #define rb_hash_uint(h, i) st_hash_uint((h), (i))
816 #define rb_hash_end(h) st_hash_end(h)
840 #ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
841 #define rb_str_new(str, len) RB_GNUC_EXTENSION_BLOCK( \
842 (__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
843 rb_str_new_static((str), (len)) : \
844 rb_str_new((str), (len)) \
846 #define rb_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
847 (__builtin_constant_p(str)) ? \
848 rb_str_new_static((str), (long)strlen(str)) : \
849 rb_str_new_cstr(str) \
851 #define rb_usascii_str_new(str, len) RB_GNUC_EXTENSION_BLOCK( \
852 (__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
853 rb_usascii_str_new_static((str), (len)) : \
854 rb_usascii_str_new((str), (len)) \
856 #define rb_utf8_str_new(str, len) RB_GNUC_EXTENSION_BLOCK( \
857 (__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
858 rb_utf8_str_new_static((str), (len)) : \
859 rb_utf8_str_new((str), (len)) \
861 #define rb_tainted_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
862 (__builtin_constant_p(str)) ? \
863 rb_tainted_str_new((str), (long)strlen(str)) : \
864 rb_tainted_str_new_cstr(str) \
866 #define rb_usascii_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
867 (__builtin_constant_p(str)) ? \
868 rb_usascii_str_new_static((str), (long)strlen(str)) : \
869 rb_usascii_str_new_cstr(str) \
871 #define rb_utf8_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
872 (__builtin_constant_p(str)) ? \
873 rb_utf8_str_new_static((str), (long)strlen(str)) : \
874 rb_utf8_str_new_cstr(str) \
876 #define rb_external_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
877 (__builtin_constant_p(str)) ? \
878 rb_external_str_new((str), (long)strlen(str)) : \
879 rb_external_str_new_cstr(str) \
881 #define rb_locale_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
882 (__builtin_constant_p(str)) ? \
883 rb_locale_str_new((str), (long)strlen(str)) : \
884 rb_locale_str_new_cstr(str) \
886 #define rb_str_buf_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
887 (__builtin_constant_p(str)) ? \
888 rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), \
889 (str), (long)strlen(str)) : \
890 rb_str_buf_new_cstr(str) \
892 #define rb_str_cat_cstr(str, ptr) RB_GNUC_EXTENSION_BLOCK( \
893 (__builtin_constant_p(ptr)) ? \
894 rb_str_cat((str), (ptr), (long)strlen(ptr)) : \
895 rb_str_cat_cstr((str), (ptr)) \
897 #define rb_exc_new_cstr(klass, ptr) RB_GNUC_EXTENSION_BLOCK( \
898 (__builtin_constant_p(ptr)) ? \
899 rb_exc_new((klass), (ptr), (long)strlen(ptr)) : \
900 rb_exc_new_cstr((klass), (ptr)) \
903 #define rb_str_new2 rb_str_new_cstr
904 #define rb_str_new3 rb_str_new_shared
905 #define rb_str_new4 rb_str_new_frozen
906 #define rb_str_new5 rb_str_new_with_class
907 #define rb_tainted_str_new2 rb_tainted_str_new_cstr
908 #define rb_str_buf_new2 rb_str_buf_new_cstr
909 #define rb_usascii_str_new2 rb_usascii_str_new_cstr
910 #define rb_str_buf_cat rb_str_cat
911 #define rb_str_buf_cat2 rb_str_cat_cstr
912 #define rb_str_cat2 rb_str_cat_cstr
913 #define rb_strlen_lit(str) (sizeof(str "") - 1)
914 #define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
915 #define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
916 #define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
917 #define rb_enc_str_new_lit(str, enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
918 #define rb_str_new_literal(str) rb_str_new_lit(str)
919 #define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str)
920 #define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
921 #define rb_enc_str_new_literal(str, enc) rb_enc_str_new_lit(str, enc)
945 #define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
946 #define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
1025 #if defined(__cplusplus)
1033 #if defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P)
1034 # define rb_f_notimplement_p(f) __builtin_types_compatible_p(__typeof__(f),__typeof__(rb_f_notimplement))
1036 # define rb_f_notimplement_p(f) 0
1039 #if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) && !defined(_WIN32) && !defined(__CYGWIN__)
1040 #if defined(__has_attribute) && __has_attribute(transparent_union) && __has_attribute(unused) && __has_attribute(weakref) && __has_attribute(nonnull)
1041 #define RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,funcargs) \
1042 __attribute__((__unused__,__weakref__(#def),__nonnull__ nonnull))static void defname(RB_UNWRAP_MACRO decl,VALUE(*func)funcargs,int arity);
1046 #if defined(RB_METHOD_DEFINITION_DECL_C) || defined(__cplusplus)
1047 #ifndef RB_METHOD_DEFINITION_DECL_C
1048 #define RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,funcargs) \
1049 static inline void defname(RB_UNWRAP_MACRO decl,VALUE(*func)funcargs,int arity) \
1051 def(RB_UNWRAP_MACRO vars,(VALUE(*)(ANYARGS))(func),arity); \
1055 #define RB_UNWRAP_MACRO(...) __VA_ARGS__
1058 #define RB_METHOD_DEFINITION_DECL_CXX_BEGIN(def) template <int Arity> struct def##_tmpl {};
1059 #define RB_METHOD_DEFINITION_DECL_CXX(def,defname,decl,vars,funcargs,arity) \
1060 template <> struct def##_tmpl<arity> { \
1061 static void define(RB_UNWRAP_MACRO decl, VALUE (*func)funcargs) {::defname(RB_UNWRAP_MACRO vars, func, arity);} \
1062 static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(...)) {::defname(RB_UNWRAP_MACRO vars, reinterpret_cast<VALUE(*)funcargs>(func), arity);} \
1065 #define RB_METHOD_DEFINITION_DECL_CXX_BEGIN(def)
1066 #define RB_METHOD_DEFINITION_DECL_CXX(def,defname,decl,vars,funcargs,arity)
1068 #define RB_METHOD_DEFINITION_DECL_1(def,nonnull,defname,arity,decl,vars,funcargs) \
1069 RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,funcargs) \
1070 RB_METHOD_DEFINITION_DECL_CXX(def,defname,decl,vars,funcargs,arity)
1072 #define RB_METHOD_DEFINITION_DECL(def,nonnull,decl,vars) \
1073 RB_METHOD_DEFINITION_DECL_CXX_BEGIN(def) \
1074 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##0 ,0 ,decl,vars,(VALUE)) \
1075 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##1 ,1 ,decl,vars,(VALUE,VALUE)) \
1076 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##2 ,2 ,decl,vars,(VALUE,VALUE,VALUE)) \
1077 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##3 ,3 ,decl,vars,(VALUE,VALUE,VALUE,VALUE)) \
1078 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##4 ,4 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE)) \
1079 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##5 ,5 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1080 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##6 ,6 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1081 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##7 ,7 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1082 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##8 ,8 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1083 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##9 ,9 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1084 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##10,10,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1085 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##11,11,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1086 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##12,12,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1087 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##13,13,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1088 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##14,14,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1089 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##15,15,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
1090 RB_METHOD_DEFINITION_DECL_M3(def,nonnull,def##m3,decl,vars) \
1091 RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##m2,-2,decl,vars,(VALUE,VALUE)) \
1092 RB_METHOD_DEFINITION_DECL_M1(def,nonnull,def##m1,decl,vars)
1094 #define RB_METHOD_DEFINITION_DECL_M1(def,nonnull,defname,decl,vars) \
1095 RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,VALUE*,VALUE)) \
1096 RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,const VALUE*,VALUE)) \
1097 RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,const VALUE*,VALUE,VALUE)) \
1098 RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(...)) \
1099 template <> struct def##_tmpl<-1> { \
1100 static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(int,VALUE*,VALUE)) {::defname(RB_UNWRAP_MACRO vars, func, -1);} \
1101 static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(int,const VALUE*,VALUE)) {::defname(RB_UNWRAP_MACRO vars, func, -1);} \
1102 static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(int,const VALUE*,VALUE,VALUE)) {::defname(RB_UNWRAP_MACRO vars, func, -1);} \
1103 static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(...)) {::defname(RB_UNWRAP_MACRO vars, func, -1);} \
1105 #define RB_METHOD_DEFINITION_DECL_M3(def,nonnull,defname,decl,vars)
1107 #define RB_METHOD_DEFINITION_DECL_M1(def,nonnull,defname,decl,vars) \
1108 RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE))
1109 #define RB_METHOD_DEFINITION_DECL_M3(def,nonnull,defname,decl,vars) \
1110 RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,())
1115 #ifdef RB_METHOD_DEFINITION_DECL
1119 #define rb_define_method_id(m, n, f, a) rb_define_method_id_tmpl<a>::define(m, n, f)
1121 #define rb_define_method_id_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_method_id15,rb_define_method_idm3)
1122 #define rb_define_method_id_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_method_id14,rb_define_method_id_choose_prototype15(n))
1123 #define rb_define_method_id_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_method_id13,rb_define_method_id_choose_prototype14(n))
1124 #define rb_define_method_id_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_method_id12,rb_define_method_id_choose_prototype13(n))
1125 #define rb_define_method_id_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_method_id11,rb_define_method_id_choose_prototype12(n))
1126 #define rb_define_method_id_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_method_id10,rb_define_method_id_choose_prototype11(n))
1127 #define rb_define_method_id_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_method_id9, rb_define_method_id_choose_prototype10(n))
1128 #define rb_define_method_id_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_method_id8, rb_define_method_id_choose_prototype9(n))
1129 #define rb_define_method_id_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_method_id7, rb_define_method_id_choose_prototype8(n))
1130 #define rb_define_method_id_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_method_id6, rb_define_method_id_choose_prototype7(n))
1131 #define rb_define_method_id_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_method_id5, rb_define_method_id_choose_prototype6(n))
1132 #define rb_define_method_id_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_method_id4, rb_define_method_id_choose_prototype5(n))
1133 #define rb_define_method_id_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_method_id3, rb_define_method_id_choose_prototype4(n))
1134 #define rb_define_method_id_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_method_id2, rb_define_method_id_choose_prototype3(n))
1135 #define rb_define_method_id_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_method_id1, rb_define_method_id_choose_prototype2(n))
1136 #define rb_define_method_id_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_method_id0, rb_define_method_id_choose_prototype1(n))
1137 #define rb_define_method_id_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_method_idm1,rb_define_method_id_choose_prototype0(n))
1138 #define rb_define_method_id_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_method_idm2,rb_define_method_id_choose_prototypem1(n))
1139 #define rb_define_method_id_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_method_idm3,rb_define_method_id_choose_prototypem2(n))
1140 #define rb_define_method_id(klass, mid, func, arity) rb_define_method_id_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
1145 #define rb_define_protected_method(m, n, f, a) rb_define_protected_method_tmpl<a>::define(m, n, f)
1147 #define rb_define_protected_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_protected_method15,rb_define_protected_methodm3)
1148 #define rb_define_protected_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_protected_method14,rb_define_protected_method_choose_prototype15(n))
1149 #define rb_define_protected_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_protected_method13,rb_define_protected_method_choose_prototype14(n))
1150 #define rb_define_protected_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_protected_method12,rb_define_protected_method_choose_prototype13(n))
1151 #define rb_define_protected_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_protected_method11,rb_define_protected_method_choose_prototype12(n))
1152 #define rb_define_protected_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_protected_method10,rb_define_protected_method_choose_prototype11(n))
1153 #define rb_define_protected_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_protected_method9, rb_define_protected_method_choose_prototype10(n))
1154 #define rb_define_protected_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_protected_method8, rb_define_protected_method_choose_prototype9(n))
1155 #define rb_define_protected_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_protected_method7, rb_define_protected_method_choose_prototype8(n))
1156 #define rb_define_protected_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_protected_method6, rb_define_protected_method_choose_prototype7(n))
1157 #define rb_define_protected_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_protected_method5, rb_define_protected_method_choose_prototype6(n))
1158 #define rb_define_protected_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_protected_method4, rb_define_protected_method_choose_prototype5(n))
1159 #define rb_define_protected_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_protected_method3, rb_define_protected_method_choose_prototype4(n))
1160 #define rb_define_protected_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_protected_method2, rb_define_protected_method_choose_prototype3(n))
1161 #define rb_define_protected_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_protected_method1, rb_define_protected_method_choose_prototype2(n))
1162 #define rb_define_protected_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_protected_method0, rb_define_protected_method_choose_prototype1(n))
1163 #define rb_define_protected_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_protected_methodm1,rb_define_protected_method_choose_prototype0(n))
1164 #define rb_define_protected_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_protected_methodm2,rb_define_protected_method_choose_prototypem1(n))
1165 #define rb_define_protected_method_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_protected_methodm3,rb_define_protected_method_choose_prototypem2(n))
1166 #define rb_define_protected_method(klass, mid, func, arity) rb_define_protected_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
1171 #define rb_define_private_method(m, n, f, a) rb_define_private_method_tmpl<a>::define(m, n, f)
1173 #define rb_define_private_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_private_method15,rb_define_private_methodm3)
1174 #define rb_define_private_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_private_method14,rb_define_private_method_choose_prototype15(n))
1175 #define rb_define_private_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_private_method13,rb_define_private_method_choose_prototype14(n))
1176 #define rb_define_private_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_private_method12,rb_define_private_method_choose_prototype13(n))
1177 #define rb_define_private_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_private_method11,rb_define_private_method_choose_prototype12(n))
1178 #define rb_define_private_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_private_method10,rb_define_private_method_choose_prototype11(n))
1179 #define rb_define_private_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_private_method9, rb_define_private_method_choose_prototype10(n))
1180 #define rb_define_private_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_private_method8, rb_define_private_method_choose_prototype9(n))
1181 #define rb_define_private_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_private_method7, rb_define_private_method_choose_prototype8(n))
1182 #define rb_define_private_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_private_method6, rb_define_private_method_choose_prototype7(n))
1183 #define rb_define_private_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_private_method5, rb_define_private_method_choose_prototype6(n))
1184 #define rb_define_private_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_private_method4, rb_define_private_method_choose_prototype5(n))
1185 #define rb_define_private_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_private_method3, rb_define_private_method_choose_prototype4(n))
1186 #define rb_define_private_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_private_method2, rb_define_private_method_choose_prototype3(n))
1187 #define rb_define_private_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_private_method1, rb_define_private_method_choose_prototype2(n))
1188 #define rb_define_private_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_private_method0, rb_define_private_method_choose_prototype1(n))
1189 #define rb_define_private_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_private_methodm1,rb_define_private_method_choose_prototype0(n))
1190 #define rb_define_private_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_private_methodm2,rb_define_private_method_choose_prototypem1(n))
1191 #define rb_define_private_method_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_private_methodm3,rb_define_private_method_choose_prototypem2(n))
1192 #define rb_define_private_method(klass, mid, func, arity) rb_define_private_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
1197 #define rb_define_singleton_method(m, n, f, a) rb_define_singleton_method_tmpl<a>::define(m, n, f)
1199 #define rb_define_singleton_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_singleton_method15,rb_define_singleton_methodm3)
1200 #define rb_define_singleton_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_singleton_method14,rb_define_singleton_method_choose_prototype15(n))
1201 #define rb_define_singleton_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_singleton_method13,rb_define_singleton_method_choose_prototype14(n))
1202 #define rb_define_singleton_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_singleton_method12,rb_define_singleton_method_choose_prototype13(n))
1203 #define rb_define_singleton_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_singleton_method11,rb_define_singleton_method_choose_prototype12(n))
1204 #define rb_define_singleton_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_singleton_method10,rb_define_singleton_method_choose_prototype11(n))
1205 #define rb_define_singleton_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_singleton_method9, rb_define_singleton_method_choose_prototype10(n))
1206 #define rb_define_singleton_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_singleton_method8, rb_define_singleton_method_choose_prototype9(n))
1207 #define rb_define_singleton_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_singleton_method7, rb_define_singleton_method_choose_prototype8(n))
1208 #define rb_define_singleton_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_singleton_method6, rb_define_singleton_method_choose_prototype7(n))
1209 #define rb_define_singleton_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_singleton_method5, rb_define_singleton_method_choose_prototype6(n))
1210 #define rb_define_singleton_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_singleton_method4, rb_define_singleton_method_choose_prototype5(n))
1211 #define rb_define_singleton_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_singleton_method3, rb_define_singleton_method_choose_prototype4(n))
1212 #define rb_define_singleton_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_singleton_method2, rb_define_singleton_method_choose_prototype3(n))
1213 #define rb_define_singleton_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_singleton_method1, rb_define_singleton_method_choose_prototype2(n))
1214 #define rb_define_singleton_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_singleton_method0, rb_define_singleton_method_choose_prototype1(n))
1215 #define rb_define_singleton_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_singleton_methodm1,rb_define_singleton_method_choose_prototype0(n))
1216 #define rb_define_singleton_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_singleton_methodm2,rb_define_singleton_method_choose_prototypem1(n))
1217 #define rb_define_singleton_method_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_singleton_methodm3,rb_define_singleton_method_choose_prototypem2(n))
1218 #define rb_define_singleton_method(klass, mid, func, arity) rb_define_singleton_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
1223 #if defined(__cplusplus)
VALUE rb_reg_match_post(VALUE)
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
VALUE rb_str_replace(VALUE, VALUE)
int rb_thread_fd_writable(int)
void rb_match_busy(VALUE)
VALUE rb_io_puts(int, const VALUE *, VALUE)
void rb_reset_random_seed(void)
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
VALUE rb_str_plus(VALUE, VALUE)
VALUE rb_str_ellipsize(VALUE, long)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
VALUE rb_big_div(VALUE, VALUE)
VALUE rb_proc_lambda_p(VALUE)
VALUE rb_reg_nth_defined(int, VALUE)
#define rb_fd_copy(d, s, n)
VALUE rb_check_funcall(VALUE, ID, int, const VALUE *)
#define RUBY_SYMBOL_EXPORT_END
VALUE rb_cv_get(VALUE, const char *)
VALUE rb_str_concat(VALUE, VALUE)
void rb_define_method_id(VALUE, ID, VALUE(*)(ANYARGS), int)
double rb_genrand_real(void)
const char * rb_sourcefile(void)
int rb_is_const_id(ID id)
VALUE rb_big_minus(VALUE, VALUE)
int rb_cloexec_dup2(int oldfd, int newfd)
void rb_ary_modify(VALUE)
rb_pid_t rb_spawn_err(int, const VALUE *, char *, size_t)
VALUE rb_str_vcatf(VALUE, const char *, va_list)
VALUE rb_ary_push(VALUE, VALUE)
VALUE rb_struct_define_under(VALUE, const char *,...)
VALUE rb_str_freeze(VALUE)
void rb_thread_check_ints(void)
VALUE rb_flt_rationalize_with_prec(VALUE, VALUE)
VALUE rb_method_call(int, const VALUE *, VALUE)
int rb_cloexec_dup(int oldfd)
VALUE rb_exc_new(VALUE, const char *, long)
struct timespec rb_time_timespec(VALUE time)
VALUE rb_mod_remove_const(VALUE, VALUE)
VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int)
RUBY_EXTERN VALUE rb_default_rs
int rb_cloexec_pipe(int fildes[2])
void rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
st_index_t rb_str_hash(VALUE)
int rb_method_basic_definition_p(VALUE, ID)
#define range(low, item, hi)
VALUE rb_thread_wakeup_alive(VALUE)
VALUE rb_exc_new_str(VALUE, VALUE)
int rb_cmpint(VALUE, VALUE, VALUE)
int rb_const_defined(VALUE, ID)
VALUE rb_tainted_str_new(const char *, long)
VALUE rb_struct_size(VALUE s)
int rb_feature_provided(const char *, const char **)
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
VALUE rb_str_scrub(VALUE, VALUE)
void rb_timespec_now(struct timespec *)
void rb_gc_mark_locations(const VALUE *, const VALUE *)
VALUE rb_Hash(VALUE)
Equivalent to Kernel#Hash in Ruby.
VALUE rb_last_status_get(void)
VALUE rb_mod_class_variables(int, const VALUE *, VALUE)
VALUE rb_struct_members(VALUE)
VALUE rb_ary_plus(VALUE, VALUE)
VALUE rb_str_buf_new(long)
VALUE rb_complex_polar(VALUE x, VALUE y)
VALUE rb_fiber_yield(int argc, const VALUE *argv)
VALUE rb_assoc_new(VALUE, VALUE)
unsigned long rb_genrand_ulong_limited(unsigned long i)
VALUE rb_binding_new(void)
VALUE rb_str_buf_cat_ascii(VALUE, const char *)
VALUE rb_random_bytes(VALUE rnd, long n)
VALUE rb_time_num_new(VALUE, VALUE)
VALUE rb_proc_times(VALUE)
VALUE rb_cvar_defined(VALUE, ID)
VALUE rb_str_buf_new_cstr(const char *)
VALUE rb_ary_to_ary(VALUE)
VALUE rb_mutex_trylock(VALUE mutex)
VALUE rb_f_abort(int argc, const VALUE *argv)
VALUE rb_ary_concat(VALUE, VALUE)
int rb_proc_exec(const char *)
VALUE rb_complex_conjugate(VALUE z)
VALUE rb_dbl_cmp(double a, double b)
VALUE rb_io_printf(int, const VALUE *, VALUE)
rb_alloc_func_t rb_get_alloc_func(VALUE)
VALUE rb_mod_constants(int, const VALUE *, VALUE)
VALUE rb_external_str_new(const char *, long)
VALUE rb_str_substr(VALUE, long, long)
VALUE rb_ary_rassoc(VALUE, VALUE)
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit)
VALUE rb_ary_assoc(VALUE, VALUE)
VALUE rb_attr_get(VALUE, ID)
VALUE rb_str_new(const char *, long)
VALUE rb_class_superclass(VALUE)
Returns the superclass of klass.
VALUE rb_class_new_instance_kw(int, const VALUE *, VALUE, int)
double rb_cstr_to_dbl(const char *, int)
Parses a string representation of a floating point number.
VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *)
VALUE rb_singleton_class_clone(VALUE)
VALUE rb_ary_subseq(VALUE, long, long)
VALUE rb_complex_arg(VALUE z)
VALUE rb_obj_as_string(VALUE)
VALUE rb_module_new(void)
void rb_w32_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
void rb_clear_method_cache_by_class(VALUE)
VALUE rb_mod_init_copy(VALUE, VALUE)
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
VALUE rb_str_cat_cstr(VALUE, const char *)
VALUE rb_mutex_locked_p(VALUE mutex)
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
VALUE rb_Complex(VALUE, VALUE)
VALUE rb_utf8_str_new(const char *, long)
VALUE rb_big_divmod(VALUE, VALUE)
VALUE rb_thread_current(void)
VALUE rb_f_exit(int argc, const VALUE *argv)
VALUE rb_ary_shift(VALUE)
void rb_set_end_proc(void(*)(VALUE), VALUE)
VALUE rb_file_open(const char *, const char *)
VALUE rb_rational_num(VALUE rat)
VALUE rb_check_convert_type(VALUE, int, const char *, const char *)
Tries to convert an object into another type.
VALUE rb_obj_untrusted(VALUE obj)
call-seq: obj.untrusted? -> false
long rb_str_strlen(VALUE)
VALUE rb_rational_den(VALUE rat)
size_t rb_absint_size(VALUE val, int *nlz_bits_ret)
PUREFUNC(int rb_during_gc(void))
VALUE rb_file_s_expand_path(int, const VALUE *)
RUBY_EXTERN VALUE rb_output_rs
void rb_mark_tbl(struct st_table *)
VALUE rb_const_get_at(VALUE, ID)
void rb_cv_set(VALUE, const char *, VALUE)
VALUE rb_gc_disable(void)
void rb_fd_fix_cloexec(int fd)
VALUE rb_complex_uminus(VALUE z)
int rb_cloexec_fcntl_dupfd(int fd, int minfd)
VALUE rb_str_length(VALUE)
void rb_thread_sleep(int)
VALUE rb_ary_resurrect(VALUE ary)
void rb_free_generic_ivar(VALUE)
void rb_lastline_set(VALUE)
VALUE rb_inspect(VALUE)
Convenient wrapper of Object::inspect.
VALUE rb_time_nano_new(time_t, long)
VALUE rb_complex_real(VALUE z)
VALUE rb_marshal_dump(VALUE, VALUE)
VALUE rb_complex_new(VALUE, VALUE)
VALUE rb_obj_untaint(VALUE)
call-seq: obj.untaint -> obj
VALUE rb_Rational(VALUE, VALUE)
VALUE rb_big_and(VALUE, VALUE)
VALUE rb_f_exec(int argc, const VALUE *argv)
struct st_table * rb_hash_tbl(VALUE, const char *file, int line)
VALUE rb_check_string_type(VALUE)
VALUE rb_Float(VALUE)
Equivalent to Kernel#Float in Ruby.
VALUE rb_time_utc_offset(VALUE time)
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
void rb_define_singleton_method(VALUE, const char *, VALUE(*)(ANYARGS), int)
Defines a singleton method for obj.
VALUE rb_big_unpack(unsigned long *buf, long num_longs)
int rb_arithmetic_sequence_extract(VALUE, rb_arithmetic_sequence_components_t *)
VALUE rb_time_timespec_new(const struct timespec *, int)
Returns a time object with UTC/localtime/fixed offset.
VALUE rb_big_lshift(VALUE, VALUE)
void rb_str_modify(VALUE)
VALUE rb_hash_lookup2(VALUE, VALUE, VALUE)
VALUE rb_make_exception(int, const VALUE *)
Make an Exception object from the list of arguments in a manner similar to Kernel#raise.
double rb_str_to_dbl(VALUE, int)
Parses a string representation of a floating point number.
void rb_const_set(VALUE, ID, VALUE)
void rb_define_protected_method(VALUE, const char *, VALUE(*)(ANYARGS), int)
VALUE rb_str_inspect(VALUE)
VALUE rb_check_hash_type(VALUE)
VALUE rb_Integer(VALUE)
Equivalent to Kernel#Integer in Ruby.
void rb_define_class_variable(VALUE, const char *, VALUE)
rb_gvar_setter_t rb_str_setter
VALUE rb_memory_id(VALUE)
void rb_loaderror(const char *fmt,...)
int rb_provided(const char *)
VALUE rb_find_file_safe(VALUE, int)
CONSTFUNC(VALUE rb_dbl_cmp(double, double))
void rb_gvar_setter_t(VALUE val, ID id, VALUE *data)
void rb_name_error(ID id, const char *fmt,...)
VALUE rb_obj_instance_variables(VALUE)
int rb_method_boundp(VALUE, ID, int)
int rb_reg_backref_number(VALUE match, VALUE backref)
VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE)
VALUE rb_const_remove(VALUE, ID)
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
void rb_set_class_path(VALUE, VALUE, const char *)
VALUE rb_filesystem_str_new_cstr(const char *)
rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags)
VALUE rb_struct_initialize(VALUE, VALUE)
unsigned int rb_genrand_int32(void)
VALUE rb_sym_all_symbols(void)
int rb_thread_interrupted(VALUE thval)
VALUE rb_reg_new(const char *, long, int)
#define rb_fd_select(n, rfds, wfds, efds, timeout)
void rb_gc_copy_finalizer(VALUE, VALUE)
void rb_write_error2(const char *, long)
int rb_obj_respond_to(VALUE, ID, int)
int rb_is_attrset_id(ID id)
VALUE rb_require_safe(VALUE, int)
VALUE rb_file_s_absolute_path(int, const VALUE *)
VALUE rb_struct_alloc(VALUE, VALUE)
VALUE rb_struct_alloc_noinit(VALUE)
VALUE rb_big_rshift(VALUE, VALUE)
#define rb_check_frozen_internal(obj)
VALUE rb_blocking_function_t(void *)
VALUE rb_str_locktmp(VALUE)
VALUE rb_str_split(VALUE, const char *)
VALUE rb_num_coerce_cmp(VALUE, VALUE, ID)
VALUE rb_hash_aref(VALUE, VALUE)
VALUE rb_complex_pow(VALUE base, VALUE exp)
VALUE rb_big_mul(VALUE, VALUE)
int rb_respond_to(VALUE, ID)
int rb_is_class_id(ID id)
VALUE rb_struct_new(VALUE,...)
VALUE rb_protect(VALUE(*)(VALUE), VALUE, int *)
Protects a function call from potential global escapes from the function.
int rb_eql(VALUE, VALUE)
Determines if obj1 and obj2 are equal in terms of Object::eql?.
void rb_cvar_set(VALUE, ID, VALUE)
#define rb_hash_uint32(h, i)
st_index_t rb_memhash(const void *ptr, long len)
VALUE rb_obj_taint(VALUE)
call-seq: obj.taint -> obj
VALUE rb_usascii_str_new_static(const char *, long)
void rb_error_frozen(const char *what)
VALUE rb_mutex_lock(VALUE mutex)
VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat)
size_t rb_str_capacity(VALUE str)
VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv)
VALUE rb_f_global_variables(void)
VALUE rb_str_resize(VALUE, long)
VALUE rb_obj_untrust(VALUE)
call-seq: obj.untrust -> obj
#define UNLIMITED_ARGUMENTS
VALUE rb_vsprintf(const char *, va_list)
VALUE rb_require_string(VALUE)
VALUE rb_define_finalizer(VALUE, VALUE)
int rb_str_hash_cmp(VALUE, VALUE)
VALUE rb_ivar_get(VALUE, ID)
VALUE rb_hash_lookup(VALUE, VALUE)
VALUE rb_str_times(VALUE, VALUE)
void rb_thread_sleep_deadly(void)
VALUE rb_big_idiv(VALUE, VALUE)
VALUE rb_io_binmode(VALUE)
void rb_st_foreach_safe(struct st_table *, int(*)(st_data_t, st_data_t, st_data_t), st_data_t)
VALUE rb_to_float(VALUE)
Converts a Numeric object into Float.
void rb_ivar_foreach(VALUE, int(*)(ID, VALUE, st_data_t), st_data_t)
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
VALUE rb_reg_match_last(VALUE)
VALUE rb_obj_class(VALUE)
Equivalent to Object#class in Ruby.
void rb_alias_variable(ID, ID)
void rb_alias(VALUE, ID, ID)
VALUE rb_complex_raw(VALUE, VALUE)
VALUE rb_str_format(int, const VALUE *, VALUE)
VALUE rb_obj_is_proc(VALUE)
VALUE rb_define_class_id(ID, VALUE)
Defines a new class.
VALUE rb_reg_match_pre(VALUE)
void rb_gc_mark_movable(VALUE)
VALUE rb_ary_new_capa(long capa)
DEPRECATED_BY(rb_complex_new_polar, VALUE rb_complex_polar(VALUE abs, VALUE arg))
void rb_syswait(rb_pid_t pid)
VALUE rb_file_open_str(VALUE, const char *)
VALUE rb_str_drop_bytes(VALUE, long)
VALUE rb_define_module_id_under(VALUE, ID)
VALUE rb_utf8_str_new_static(const char *, long)
VALUE rb_ary_entry(VALUE, long)
unsigned long rb_big2ulong(VALUE)
void rb_must_asciicompat(VALUE)
#define rb_check_frozen(obj)
VALUE rb_str_intern(VALUE)
VALUE rb_obj_is_instance_of(VALUE, VALUE)
Determines if obj is an instance of c.
void rb_mem_clear(VALUE *, long)
#define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn)
VALUE rb_Array(VALUE)
Equivalent to Kernel#Array in Ruby.
VALUE rb_thread_main(void)
VALUE rb_const_list(void *)
VALUE rb_big2str(VALUE, int)
void rb_thread_wait_fd(int)
RUBY_EXTERN VALUE rb_argv0
ID rb_frame_this_func(void)
The original name of the current method.
int rb_const_defined_from(VALUE, ID)
VALUE rb_ary_includes(VALUE, VALUE)
void rb_error_untrusted(VALUE)
void rb_str_update(VALUE, long, long, VALUE)
VALUE rb_complex_div(VALUE x, VALUE y)
void rb_singleton_class_attached(VALUE, VALUE)
Attach a object to a singleton class.
VALUE rb_hash_delete_if(VALUE)
#define rb_str_dup_frozen
VALUE rb_hash_delete(VALUE, VALUE)
void rb_jump_tag(int tag)
Continues the exception caught by rb_protect() and rb_eval_string_protect().
VALUE rb_file_dirname(VALUE fname)
VALUE rb_check_to_integer(VALUE, const char *)
Tries to convert val into Integer.
VALUE rb_str_new_cstr(const char *)
void rb_clear_constant_cache(void)
VALUE rb_class_private_instance_methods(int, const VALUE *, VALUE)
void rb_gc_adjust_memory_usage(ssize_t)
VALUE rb_detach_process(rb_pid_t pid)
VALUE rb_check_array_type(VALUE)
struct timespec rb_time_timespec_interval(VALUE num)
int rb_sym_interned_p(VALUE)
int rb_memcicmp(const void *, const void *, long)
VALUE rb_gc_latest_gc_info(VALUE)
VALUE rb_ary_new_from_args(long n,...)
VALUE rb_ary_aref(int, const VALUE *, VALUE)
VALUE rb_reg_new_str(VALUE, int)
void * rb_load_file_str(VALUE)
void rb_gc_update_tbl_refs(st_table *ptr)
VALUE rb_str_equal(VALUE str1, VALUE str2)
int rb_bigzero_p(VALUE x)
VALUE rb_struct_aref(VALUE, VALUE)
VALUE rb_io_ascii8bit_binmode(VALUE)
int rb_find_file_ext(VALUE *, const char *const *)
VALUE rb_big_eql(VALUE, VALUE)
VALUE rb_thread_stop(void)
st_index_t rb_ivar_count(VALUE)
void rb_update_max_fd(int fd)
st_index_t rb_hash_start(st_index_t)
VALUE rb_obj_freeze(VALUE)
Make the object unmodifiable.
VALUE rb_ary_cat(VALUE, const VALUE *, long)
VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t,...)
VALUE rb_ary_clear(VALUE)
void rb_str_shared_replace(VALUE, VALUE)
VALUE rb_mutex_unlock(VALUE mutex)
rb_pid_t rb_spawn(int, const VALUE *)
void rb_gc_force_recycle(VALUE)
VALUE rb_file_expand_path(VALUE, VALUE)
VALUE rb_big_eq(VALUE, VALUE)
VALUE rb_ary_freeze(VALUE)
VALUE rb_obj_method(VALUE, VALUE)
void rb_error_frozen_object(VALUE frozen_obj)
VALUE rb_thread_run(VALUE)
void rb_copy_generic_ivar(VALUE, VALUE)
void rb_interrupt(void)
Raises an Interrupt exception.
VALUE rb_utf8_str_new_cstr(const char *)
struct timeval rb_time_interval(VALUE num)
void rb_thread_sleep_forever(void)
int rb_is_global_id(ID id)
int rb_env_path_tainted(void)
VALUE rb_f_sprintf(int, const VALUE *)
VALUE rb_mod_remove_cvar(VALUE, VALUE)
void * rb_mod_const_at(VALUE, void *)
VALUE rb_obj_frozen_p(VALUE obj)
Determines if the object is frozen.
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *)
VALUE rb_cstr_to_inum(const char *, int, int)
VALUE rb_eval_cmd_kw(VALUE, VALUE, int)
VALUE rb_eval_cmd(VALUE, VALUE, int)
void rb_unblock_function_t(void *)
void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
VALUE rb_mod_included_modules(VALUE)
VALUE rb_str_to_inum(VALUE, int, int)
void rb_str_set_len(VALUE, long)
VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
int rb_is_instance_id(ID id)
VALUE rb_backref_get(void)
VALUE rb_const_get_from(VALUE, ID)
VALUE rb_to_int(VALUE)
Converts val into Integer.
VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE)
VALUE rb_ary_delete_at(VALUE, long)
VALUE rb_num_coerce_bin(VALUE, VALUE, ID)
void rb_frozen_error_raise(VALUE frozen_obj, const char *fmt,...)
void rb_obj_call_init_kw(VALUE, int, const VALUE *, int)
VALUE rb_class_get_superclass(VALUE)
Returns the superclass of klass The return value might be an iclass of a module, unlike rb_class_supe...
VALUE rb_check_to_int(VALUE)
Tries to convert val into Integer.
VALUE rb_str_new_frozen(VALUE)
VALUE rb_reg_match2(VALUE)
struct timeval rb_time_timeval(VALUE time)
MJIT_STATIC void rb_error_arity(int argc, int min, int max)
void rb_invalid_str(const char *str, const char *type)
void rb_backref_set(VALUE)
VALUE rb_obj_dup(VALUE)
Equivalent to Object#dup in Ruby.
VALUE rb_thread_kill(VALUE)
VALUE rb_big_cmp(VALUE, VALUE)
VALUE rb_obj_trust(VALUE)
call-seq: obj.trust -> obj
VALUE rb_class_path_cached(VALUE)
void rb_set_class_path_string(VALUE, VALUE, VALUE)
VALUE rb_enum_values_pack(int, const VALUE *)
VALUE rb_ary_sort_bang(VALUE)
VALUE rb_lastline_get(void)
ID rb_frame_callee(void)
The name of the current method.
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
VALUE rb_str_buf_append(VALUE, VALUE)
VALUE rb_find_file(VALUE)
void rb_ary_store(VALUE, long, VALUE)
int rb_obj_method_arity(VALUE, ID)
VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
void rb_num_zerodiv(void)
VALUE rb_struct_getmember(VALUE, ID)
VALUE rb_ary_shared_with_p(VALUE, VALUE)
VALUE rb_proc_call_kw(VALUE, VALUE, int)
VALUE rb_ary_reverse(VALUE)
VALUE rb_io_ungetc(VALUE, VALUE)
VALUE rb_class_new(VALUE)
Creates a new class.
void rb_thread_schedule(void)
VALUE rb_ary_new_from_values(long n, const VALUE *elts)
VALUE rb_rational_new(VALUE, VALUE)
VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE *, int)
void rb_mark_tbl_no_pin(struct st_table *)
VALUE rb_complex_plus(VALUE x, VALUE y)
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc,...)
int rb_reg_options(VALUE)
VALUE rb_marshal_load(VALUE)
VALUE rb_obj_instance_exec(int, const VALUE *, VALUE)
int rb_cloexec_open(const char *pathname, int flags, mode_t mode)
int rb_uv_to_utf8(char[6], unsigned long)
double rb_random_real(VALUE rnd)
VALUE rb_hash_aset(VALUE, VALUE, VALUE)
unsigned char buf[MIME_BUF_SIZE]
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
void rb_thread_atfork(void)
VALUE rb_str_append(VALUE, VALUE)
VALUE rb_exc_new_cstr(VALUE, const char *)
VALUE rb_complex_minus(VALUE x, VALUE y)
void rb_provide(const char *)
int rb_is_absolute_path(const char *)
void ruby_default_signal(int)
rb_block_call_func * rb_block_call_func_t
int WSAAPI rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
void rb_hash_foreach(VALUE, int(*)(VALUE, VALUE, VALUE), VALUE)
VALUE rb_class_protected_instance_methods(int, const VALUE *, VALUE)
VALUE rb_make_backtrace(void)
VALUE rb_f_require(VALUE, VALUE)
#define rb_fd_isset(n, f)
void rb_remove_method(VALUE, const char *)
#define RUBY_SYMBOL_EXPORT_BEGIN
VALUE rb_time_new(time_t, long)
int rb_absint_singlebit_p(VALUE val)
#define rb_hash_uint(h, i)
char * rb_str_subpos(VALUE, long, long *)
VALUE rb_sprintf(const char *format,...)
VALUE rb_range_beg_len(VALUE, long *, long *, long, int)
void rb_cmperr(VALUE x, VALUE y)
VALUE rb_ary_delete(VALUE, VALUE)
VALUE rb_str_subseq(VALUE, long, long)
VALUE rb_cstr2inum(const char *, int)
VALUE rb_autoload_load(VALUE, ID)
VALUE rb_big_modulo(VALUE, VALUE)
VALUE rb_locale_str_new_cstr(const char *)
unsigned int rb_random_int32(VALUE rnd)
VALUE rb_obj_alloc(VALUE)
Allocates an instance of klass.
char str[HTML_ESCAPE_MAX_LEN+1]
VALUE rb_hash_fetch(VALUE, VALUE)
VALUE rb_rational_raw(VALUE, VALUE)
VALUE rb_struct_s_members(VALUE)
VALUE(*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE)
VALUE rb_range_new(VALUE, VALUE, int)
VALUE rb_thread_wakeup(VALUE)
VALUE rb_convert_type(VALUE, int, const char *, const char *)
Converts an object into another type.
VALUE rb_fiber_new(rb_block_call_func_t, VALUE)
VALUE rb_autoload_p(VALUE, ID)
int rb_mod_method_arity(VALUE, ID)
VALUE rb_struct_define(const char *,...)
void rb_mark_hash(struct st_table *)
VALUE rb_hash_freeze(VALUE)
VALUE rb_complex_imag(VALUE z)
VALUE rb_usascii_str_new(const char *, long)
VALUE rb_reg_last_match(VALUE)
VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat)
#define rb_enumeratorize_with_size_kw(obj, id, argc, argv, size_fn, kw_splat)
VALUE rb_io_addstr(VALUE, VALUE)
VALUE rb_mod_module_exec(int, const VALUE *, VALUE)
int rb_path_check(const char *)
RUBY_EXTERN VALUE rb_output_fs
VALUE(* rb_alloc_func_t)(VALUE)
void rb_big_resize(VALUE big, size_t len)
VALUE rb_fix2str(VALUE, int)
VALUE rb_io_getbyte(VALUE)
VALUE rb_ivar_defined(VALUE, ID)
VALUE rb_obj_init_copy(VALUE, VALUE)
Default implementation of #initialize_copy.
VALUE rb_str_new_shared(VALUE)
void rb_thread_atfork_before_exec(void)
VALUE rb_dbl_complex_new(double real, double imag)
Creates a Complex object.
VALUE rb_fiber_alive_p(VALUE)
void * rb_mod_const_of(VALUE, void *)
void rb_str_modify_expand(VALUE, long)
VALUE rb_struct_aset(VALUE, VALUE, VALUE)
NORETURN(void rb_cmperr(VALUE, VALUE))
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
VALUE rb_reg_init_str(VALUE re, VALUE s, int options)
VALUE rb_singleton_class(VALUE)
Returns the singleton class of obj.
VALUE rb_ary_unshift(VALUE, VALUE)
VALUE rb_f_kill(int, const VALUE *)
void rb_name_error_str(VALUE str, const char *fmt,...)
VALUE rb_big_clone(VALUE)
void rb_obj_call_init(VALUE, int, const VALUE *)
Calls #initialize method of obj with the given arguments.
VALUE rb_ary_rotate(VALUE, long)
VALUE rb_complex_mul(VALUE x, VALUE y)
int rb_is_local_id(ID id)
VALUE rb_num_coerce_bit(VALUE, VALUE, ID)
void rb_load_protect(VALUE, int, int *)
VALUE rb_io_write(VALUE, VALUE)
VALUE rb_locale_str_new(const char *, long)
int rb_symname_p(const char *)
VALUE rb_tainted_str_new_cstr(const char *)
VALUE rb_define_module_id(ID)
VALUE rb_String(VALUE)
Equivalent to Kernel#String in Ruby.
VALUE rb_str_new_with_class(VALUE, const char *, long)
void rb_write_error(const char *)
VALUE rb_str_unlocktmp(VALUE)
VALUE rb_big_or(VALUE, VALUE)
VALUE rb_proc_new(rb_block_call_func_t, VALUE)
VALUE rb_hash_clear(VALUE)
VALUE rb_big_pow(VALUE, VALUE)
VALUE rb_str2inum(VALUE, int)
int rb_thread_alone(void)
VALUE rb_str_new_static(const char *, long)
VALUE rb_complex_abs(VALUE z)
VALUE rb_reg_nth_match(int, VALUE)
VALUE rb_path2class(const char *)
VALUE rb_usascii_str_new_cstr(const char *)
VALUE rb_gc_location(VALUE)
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
VALUE rb_io_ungetbyte(VALUE, VALUE)
VALUE rb_random_int(VALUE rnd, VALUE max)
VALUE rb_str_catf(VALUE str, const char *format,...)
VALUE rb_obj_is_method(VALUE)
VALUE rb_obj_remove_instance_variable(VALUE, VALUE)
VALUE rb_ary_join(VALUE, VALUE)
VALUE rb_class_name(VALUE)
VALUE rb_apply(VALUE, ID, VALUE)
Calls a method.
VALUE rb_filesystem_str_new(const char *, long)
VALUE rb_class_path(VALUE)
void rb_check_copyable(VALUE obj, VALUE orig)
void rb_last_status_set(int status, rb_pid_t pid)
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.
VALUE rb_cvar_get(VALUE, ID)
size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
VALUE rb_ivar_set(VALUE, ID, VALUE)
void rb_thread_wait_for(struct timeval)
void rb_exc_fatal(VALUE mesg)
Raises a fatal error in the current thread.
VALUE rb_big_new(size_t, int)
int rb_find_file_ext_safe(VALUE *, const char *const *, int)
PRINTF_ARGS(NORETURN(void rb_loaderror(const char *,...)), 1, 2)
const char * ruby_signal_name(int)
VALUE rb_time_succ(VALUE)
VALUE rb_thread_create(VALUE(*)(void *), void *)
void rb_mark_set(struct st_table *)
int rb_const_defined_at(VALUE, ID)
VALUE rb_mod_include_p(VALUE, VALUE)
VALUE rb_f_trace_var(int, const VALUE *)
void * rb_load_file(const char *)
VALUE rb_str_resurrect(VALUE str)
VALUE rb_big_xor(VALUE, VALUE)
VALUE rb_fiber_current(void)
VALUE rb_io_get_io(VALUE)
VALUE rb_ary_tmp_new(long)
VALUE rb_class_instance_methods(int, const VALUE *, VALUE)
VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE)
VALUE rb_reg_match(VALUE, VALUE)
VALUE rb_num_coerce_relop(VALUE, VALUE, ID)
VALUE rb_file_directory_p(VALUE, VALUE)
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker)
void rb_gc_mark_maybe(VALUE)
VALUE rb_define_class_id_under(VALUE, ID, VALUE)
Defines a class under the namespace of outer.
#define rb_check_trusted(obj)
void rb_remove_method_id(VALUE, ID)
VALUE rb_get_values_at(VALUE, long, int, const VALUE *, VALUE(*)(VALUE, long))
void rb_undef_alloc_func(VALUE)
VALUE rb_proc_call(VALUE, VALUE)
int rb_reserved_fd_p(int fd)
VALUE rb_str_tmp_new(long)
VALUE rb_method_call_kw(int, const VALUE *, VALUE, int)
void rb_loaderror_with_path(VALUE path, const char *fmt,...)
VALUE rb_obj_singleton_methods(int, const VALUE *, VALUE)
VALUE rb_path_to_class(VALUE)
VALUE rb_file_absolute_path(VALUE, VALUE)
void rb_define_private_method(VALUE, const char *, VALUE(*)(ANYARGS), int)
VALUE rb_mod_const_missing(VALUE klass, VALUE name)
VALUE rb_any_to_s(VALUE)
Default implementation of #to_s.
VALUE rb_mod_module_eval(int, const VALUE *, VALUE)
VALUE rb_undefine_finalizer(VALUE)
void rb_attr(VALUE, ID, int, int, int)
VALUE rb_str_cat(VALUE, const char *, long)
VALUE rb_block_lambda(void)
VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int)
VALUE rb_obj_is_kind_of(VALUE, VALUE)
Determines if obj is a kind of c.
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
VALUE rb_external_str_new_cstr(const char *)
void rb_thread_fd_close(int)
VALUE rb_complex_new_polar(VALUE abs, VALUE arg)
VALUE rb_flt_rationalize(VALUE)
VALUE rb_thread_local_aref(VALUE, ID)
void rb_hash_bulk_insert(long, const VALUE *, VALUE)
VALUE rb_obj_instance_eval(int, const VALUE *, VALUE)
int rb_str_comparable(VALUE, VALUE)
long rb_str_offset(VALUE, long)
VALUE rb_class_public_instance_methods(int, const VALUE *, VALUE)
VALUE rb_obj_tainted(VALUE obj)
call-seq: obj.tainted? -> false
VALUE rb_obj_clone(VALUE)
Almost same as Object::clone.
VALUE rb_ary_cmp(VALUE, VALUE)
long rb_str_sublen(VALUE, long)
VALUE rb_mod_ancestors(VALUE)
VALUE rb_hash_size(VALUE)
VALUE rb_ary_replace(VALUE copy, VALUE orig)
VALUE rb_check_to_float(VALUE)
Tries to convert an object into Float.
VALUE rb_big_plus(VALUE, VALUE)
int rb_str_cmp(VALUE, VALUE)
VALUE rb_f_untrace_var(int, const VALUE *)
VALUE rb_class_inherited_p(VALUE mod, VALUE arg)
Determines if mod inherits arg.
VALUE rb_io_fdopen(int, int, const char *)
VALUE rb_thread_local_aset(VALUE, ID, VALUE)
void rb_check_inheritable(VALUE)
Ensures a class can be derived from super.
VALUE rb_class_real(VALUE cl)
Looks up the nearest ancestor of cl, skipping singleton classes or module inclusions.
VALUE rb_str_encode_ospath(VALUE)
VALUE rb_io_print(int, const VALUE *, VALUE)
VALUE rb_ary_resize(VALUE ary, long len)
expands or shrinks ary to len elements.
VALUE rb_block_proc(void)
VALUE rb_const_get(VALUE, ID)