12 #if defined __GNUC__ && __GNUC__ < 3 31 #define BITSPERSHORT (2*CHAR_BIT) 32 #define SHORTMASK ((1<<BITSPERSHORT)-1) 33 #define SHORTDN(x) RSHIFT((x),BITSPERSHORT) 35 #if SIZEOF_SHORT == SIZEOF_BDIGIT 36 #define SHORTLEN(x) (x) 51 #define SHORTLEN(x) shortlen((x),d) 54 #define MARSHAL_MAJOR 4 55 #define MARSHAL_MINOR 8 59 #define TYPE_FALSE 'F' 60 #define TYPE_FIXNUM 'i' 62 #define TYPE_EXTENDED 'e' 63 #define TYPE_UCLASS 'C' 64 #define TYPE_OBJECT 'o' 66 #define TYPE_USERDEF 'u' 67 #define TYPE_USRMARSHAL 'U' 68 #define TYPE_FLOAT 'f' 69 #define TYPE_BIGNUM 'l' 70 #define TYPE_STRING '"' 71 #define TYPE_REGEXP '/' 72 #define TYPE_ARRAY '[' 74 #define TYPE_HASH_DEF '}' 75 #define TYPE_STRUCT 'S' 76 #define TYPE_MODULE_OLD 'M' 77 #define TYPE_CLASS 'c' 78 #define TYPE_MODULE 'm' 80 #define TYPE_SYMBOL ':' 81 #define TYPE_SYMLINK ';' 86 static ID s_dump, s_load, s_mdump, s_mload;
87 static ID s_dump_data, s_load_data, s_alloc, s_call;
88 static ID s_getbyte, s_read, s_write, s_binmode;
90 #define name_s_dump "_dump" 91 #define name_s_load "_load" 92 #define name_s_mdump "marshal_dump" 93 #define name_s_mload "marshal_load" 94 #define name_s_dump_data "_dump_data" 95 #define name_s_load_data "_load_data" 96 #define name_s_alloc "_alloc" 97 #define name_s_call "call" 98 #define name_s_getbyte "getbyte" 99 #define name_s_read "read" 100 #define name_s_write "write" 101 #define name_s_binmode "binmode" 110 static st_table *compat_allocator_tbl;
111 static VALUE compat_allocator_tbl_wrapper;
112 static VALUE rb_marshal_dump_limited(
VALUE obj,
VALUE port,
int limit);
125 mark_marshal_compat_t(
void *tbl)
131 static st_table *compat_allocator_table(
void);
154 #define MARSHAL_INFECTION FL_TAINT 192 return check_dump_arg(ret, arg, name);
195 #define dump_funcall(arg, obj, sym, argc, argv) \ 196 check_userdump_arg(obj, sym, argc, argv, arg, name_##sym) 197 #define dump_check_funcall(arg, obj, sym, argc, argv) \ 198 check_dump_arg(rb_check_funcall(obj, sym, argc, argv), arg, name_##sym) 200 static void clear_dump_arg(
struct dump_arg *arg);
203 mark_dump_arg(
void *
ptr)
215 free_dump_arg(
void *ptr)
222 memsize_dump_arg(
const void *ptr)
229 {mark_dump_arg, free_dump_arg, memsize_dump_arg,},
234 must_not_be_anonymous(
const char *type,
VALUE path)
251 class2path(
VALUE klass)
255 must_not_be_anonymous((
RB_TYPE_P(klass,
T_CLASS) ?
"class" :
"module"), path);
262 static void w_long(
long,
struct dump_arg*);
267 w_nbyte(
const char *s,
long n,
struct dump_arg *arg)
279 w_byte(
char c,
struct dump_arg *arg)
285 w_bytes(
const char *s,
long n,
struct dump_arg *arg)
291 #define w_cstr(s, arg) w_bytes((s), strlen(s), (arg)) 294 w_short(
int x,
struct dump_arg *arg)
296 w_byte((
char)((x >> 0) & 0xff), arg);
297 w_byte((
char)((x >> 8) & 0xff), arg);
301 w_long(
long x,
struct dump_arg *arg)
303 char buf[
sizeof(long)+1];
307 if (!(RSHIFT(x, 31) == 0 || RSHIFT(x, 31) == -1)) {
317 if (0 < x && x < 123) {
318 w_byte((
char)(x + 5), arg);
321 if (-124 < x && x < 0) {
322 w_byte((
char)((x - 5)&0xff), arg);
325 for (i=1;i<(int)
sizeof(
long)+1;i++) {
326 buf[i] = (char)(x & 0xff);
337 w_nbyte(buf, i+1, arg);
341 #define DECIMAL_MANT (53-16) 343 #if DBL_MANT_DIG > 32 345 #elif DBL_MANT_DIG > 24 347 #elif DBL_MANT_DIG > 16 357 if (--len > 0 && !*buf++) {
358 int e, s = d < 0, dig = 0;
361 modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d);
365 default: m = *buf++ & 0xff;
367 case 3: m = (m << 8) | (*buf++ & 0xff);
370 case 2: m = (m << 8) | (*buf++ & 0xff);
373 case 1: m = (m << 8) | (*buf++ & 0xff);
376 dig -= len < MANT_BITS / 8 ? 8 * (unsigned)len : MANT_BITS;
377 d += ldexp((
double)m, dig);
378 }
while ((len -= MANT_BITS / 8) > 0);
379 d = ldexp(d, e - DECIMAL_MANT);
385 #define load_mantissa(d, buf, len) (d) 389 #define FLOAT_DIG (DBL_DIG+2) 395 w_float(
double d,
struct dump_arg *arg)
397 char buf[
FLOAT_DIG + (DECIMAL_MANT + 7) / 8 + 10];
400 if (d < 0)
w_cstr(
"-inf", arg);
407 if (1.0/d < 0)
w_cstr(
"-0", arg);
411 int decpt, sign, digs, len = 0;
412 char *e, *p =
ruby_dtoa(d, 0, 0, &decpt, &sign, &e);
413 if (sign) buf[len++] =
'-';
415 if (decpt < -3 || decpt > digs) {
417 if (--digs > 0) buf[len++] =
'.';
418 memcpy(buf + len, p + 1, digs);
420 len +=
snprintf(buf + len,
sizeof(buf) - len,
"e%d", decpt - 1);
422 else if (decpt > 0) {
423 memcpy(buf + len, p, decpt);
425 if ((digs -= decpt) > 0) {
427 memcpy(buf + len, p + decpt, digs);
435 memset(buf + len,
'0', -decpt);
438 memcpy(buf + len, p, digs);
442 w_bytes(buf, len, arg);
454 w_long((
long)num, arg);
462 encname = encoding_name(sym, arg);
463 if (
NIL_P(encname) ||
473 if (!
NIL_P(encname)) {
478 w_encoding(encname, &c_arg);
486 must_not_be_anonymous(
"class", s);
495 w_object(key, arg->
arg, arg->
limit);
496 w_object(value, arg->
arg, arg->
limit);
500 #define SINGLETON_DUMP_UNABLE_P(klass) \ 501 (rb_id_table_size(RCLASS_M_TBL(klass)) > 0 || \ 502 (RCLASS_IV_TBL(klass) && RCLASS_IV_TBL(klass)->num_entries > 1)) 524 w_class(
char type,
VALUE obj,
struct dump_arg *arg,
int check)
532 obj = (
VALUE)real_obj;
535 w_extended(klass, arg, check);
546 w_extended(klass, arg,
TRUE);
548 if (klass != super) {
550 w_unique(class2path(klass), arg);
554 #define to_be_skipped_id(id) (id == rb_id_encoding() || id == rb_intern("E") || !rb_id2str(id)) 565 w_object(value, arg->
arg, arg->
limit);
609 if (limit >= 0) ++
limit;
614 w_object(encname, arg->
arg, limit);
619 w_object(encname, arg->
arg, limit);
637 if (num) *ivobj =
obj;
646 w_long(num, arg->
arg);
647 w_encoding(encname, arg);
659 w_long(num, arg->
arg);
678 if (limit > 0) limit--;
684 w_long((
long)num, arg);
691 else if (obj ==
Qtrue) {
702 if (RSHIFT((
long)obj, 31) == 0 || RSHIFT((
long)obj, 31) == -1) {
734 w_object(v, arg, limit);
747 hasiv = has_ivars(obj, (encname = encoding_name(obj, arg)), &ivobj);
748 hasiv2 = has_ivars(v, (encname2 = encoding_name(v, arg)), &ivobj2);
758 w_ivar(hasiv, ivobj, encname, &c_arg);
766 hasiv = has_ivars(obj, (encname = encoding_name(obj, arg)), &ivobj);
775 obj = compat->
dumper(real_obj);
780 if (obj != real_obj && ivobj ==
Qundef) hasiv = 0;
792 VALUE path = class2path(obj);
801 VALUE path = class2path(obj);
826 w_long((
long)slen, arg);
828 #if SIZEOF_BDIGIT > SIZEOF_SHORT 835 if (len == 0 && num == 0)
break;
857 w_byte((
char)opts, arg);
904 for (i=0; i<
len; i++) {
913 w_objivar(obj, &c_arg);
922 "no _dump_data is defined for class %"PRIsVALUE,
927 w_object(v, arg, limit);
939 w_ivar(hasiv, ivobj, encname, &c_arg);
944 clear_dump_arg(
struct dump_arg *arg)
961 NORETURN(
static inline void io_needed(
void));
1003 marshal_dump(
int argc,
VALUE *argv)
1012 if (
NIL_P(a1)) io_needed();
1015 else if (argc == 2) {
1017 else if (
NIL_P(a1)) io_needed();
1020 return rb_marshal_dump_limited(obj, port, limit);
1024 rb_marshal_dump_limited(
VALUE obj,
VALUE port,
int limit)
1051 w_object(obj, arg, limit);
1056 clear_dump_arg(arg);
1076 check_load_arg(
VALUE ret,
struct load_arg *arg,
const char *name)
1084 #define load_funcall(arg, obj, sym, argc, argv) \ 1085 check_load_arg(rb_funcallv(obj, sym, argc, argv), arg, name_##sym) 1087 static void clear_load_arg(
struct load_arg *arg);
1090 mark_load_arg(
void *ptr)
1101 free_load_arg(
void *ptr)
1103 clear_load_arg(ptr);
1108 memsize_load_arg(
const void *ptr)
1115 {mark_load_arg, free_load_arg, memsize_load_arg,},
1116 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
1119 #define r_entry(v, arg) r_entry0((v), (arg)->data->num_entries, (arg)) 1125 NORETURN(
static void too_short(
void));
1141 static unsigned char 1142 r_byte1_buffered(
struct load_arg *arg)
1149 if (
NIL_P(str)) too_short();
1175 c = r_byte1_buffered(arg);
1180 c = (
unsigned char)
NUM2CHR(v);
1187 long_toobig(
int size)
1190 STRINGIZE(SIZEOF_LONG)
", given %d)", size);
1197 int c = (
signed char)r_byte(arg);
1200 if (c == 0)
return 0;
1202 if (4 < c && c < 128) {
1205 if (c > (
int)
sizeof(long)) long_toobig(c);
1208 x |= (long)r_byte(arg) << (8*i);
1212 if (-129 < c && c < -4) {
1216 if (c > (
int)
sizeof(long)) long_toobig(c);
1219 x &= ~((long)0xff << (8*i));
1220 x |= (long)r_byte(arg) << (8*i);
1227 r_bytes1(
long len,
struct load_arg *arg)
1232 if (
NIL_P(str)) too_short();
1241 r_bytes1_buffered(
long len,
struct load_arg *arg)
1245 if (len <= arg->buflen) {
1251 long buflen = arg->
buflen;
1253 long tmp_len, read_len, need_len = len - buflen;
1256 readable = readable < BUFSIZ ? readable : BUFSIZ;
1257 read_len = need_len > readable ? need_len : readable;
1260 if (
NIL_P(tmp)) too_short();
1265 if (tmp_len < need_len) too_short();
1271 if (tmp_len > need_len) {
1272 buflen = tmp_len - need_len;
1285 #define r_bytes(arg) r_bytes0(r_long(arg), (arg)) 1288 r_bytes0(
long len,
struct load_arg *arg)
1304 str = r_bytes1_buffered(len, arg);
1307 str = r_bytes1(len, arg);
1316 static const char name_encoding[8] =
"encoding";
1321 if (l <= 0)
return -1;
1322 if (l ==
sizeof(name_encoding) &&
1323 memcmp(p, name_encoding,
sizeof(name_encoding)) == 0) {
1327 else if (l == 1 && *p ==
'E') {
1339 long num = r_long(arg);
1348 r_symreal(
struct load_arg *arg,
int ivar)
1358 long num = r_long(arg);
1360 sym = r_symbol(arg);
1361 idx = sym2encidx(sym, r_object(arg));
1375 switch ((type = r_byte(arg))) {
1382 return r_symreal(arg, ivar);
1387 return r_symlink(arg);
1394 return r_symbol(arg);
1432 compat->
loader(real_obj, v);
1451 v = r_fixup_compat(v, arg);
1452 v = r_post_proc(v, arg);
1482 VALUE sym = r_symbol(arg);
1483 VALUE val = r_object(arg);
1484 int idx = sym2encidx(sym, val);
1487 if (has_encoding) *has_encoding =
TRUE;
1492 }
while (--len > 0);
1497 path2class(
VALUE path)
1507 #define path2module(path) must_be_module(rb_path_to_class(path), path) 1529 if (oldclass) *oldclass = compat->
oldclass;
1544 return obj_alloc_by_klass(path2class(path), arg, 0);
1558 #define prohibit_ivar(type, str) do { \ 1559 if (!ivp || !*ivp) break; \ 1560 rb_raise(rb_eTypeError, \ 1561 "can't override instance variable of "type" `%"PRIsVALUE"'", \ 1569 int type = r_byte(arg);
1580 v = r_post_proc(v, arg);
1587 v = r_object0(arg, &ivar, extmod);
1588 if (ivar) r_ivar(v,
NULL, arg);
1594 VALUE path = r_unique(arg);
1601 v = r_object0(arg, 0,
Qnil);
1615 must_be_module(m, path);
1618 v = r_object0(arg, 0, extmod);
1629 VALUE c = path2class(r_unique(arg));
1634 v = r_object0(arg, 0, extmod);
1642 if (
TYPE(v) !=
TYPE(tmp))
goto format_error;
1650 v = r_leave(v, arg);
1655 v = r_leave(v, arg);
1660 v = r_leave(v, arg);
1665 long i = r_long(arg);
1668 v = r_leave(v, arg);
1677 if (strcmp(ptr,
"nan") == 0) {
1680 else if (strcmp(ptr,
"inf") == 0) {
1683 else if (strcmp(ptr,
"-inf") == 0) {
1693 v = r_leave(v, arg);
1705 data = r_bytes0(len * 2, arg);
1710 v = r_leave(v, arg);
1715 v =
r_entry(r_string(arg), arg);
1716 v = r_leave(v, arg);
1722 int options = r_byte(arg);
1723 int has_encoding =
FALSE;
1727 r_ivar(str, &has_encoding, arg);
1730 if (!has_encoding) {
1735 for (; len-- > 0; *dst++ = *src++) {
1737 case '\\': bs++;
break;
1738 case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
1739 case 'm':
case 'o':
case 'p':
case 'q':
case 'u':
case 'y':
1740 case 'E':
case 'F':
case 'H':
case 'I':
case 'J':
case 'K':
1741 case 'L':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
1742 case 'S':
case 'T':
case 'U':
case 'V':
case 'X':
case 'Y':
1744 default: bs = 0;
break;
1750 v = r_leave(v, arg);
1756 long len = r_long(arg);
1765 v = r_leave(v, arg);
1773 long len = r_long(arg);
1779 VALUE key = r_object(arg);
1780 VALUE value = r_object(arg);
1788 v = r_leave(v, arg);
1798 VALUE klass = path2class(r_unique(arg));
1799 long len = r_long(arg);
1812 v = r_entry0(v, idx, arg);
1814 for (i=0; i<
len; i++) {
1816 slot = r_symbol(arg);
1827 v = r_leave(v, arg);
1834 VALUE name = r_unique(arg);
1835 VALUE klass = path2class(name);
1843 data = r_string(arg);
1845 r_ivar(data,
NULL, arg);
1852 v = compat->
loader(klass, v);
1854 v = r_post_proc(v, arg);
1860 VALUE name = r_unique(arg);
1861 VALUE klass = path2class(name);
1865 v = obj_alloc_by_klass(klass, arg, &oldclass);
1866 if (!
NIL_P(extmod)) {
1868 append_extmod(v, extmod);
1875 data = r_object(arg);
1877 v = r_fixup_compat(v, arg);
1878 v = r_copy_ivar(v, data);
1879 v = r_post_proc(v, arg);
1880 if (!
NIL_P(extmod)) {
1881 if (oldclass) append_extmod(v, extmod);
1890 v = obj_alloc_by_path(r_unique(arg), arg);
1894 v = r_entry0(v, idx, arg);
1895 r_ivar(v,
NULL, arg);
1896 v = r_leave(v, arg);
1902 VALUE name = r_unique(arg);
1903 VALUE klass = path2class(name);
1907 v = obj_alloc_by_klass(klass, arg, &oldclass);
1914 "class %"PRIsVALUE" needs to have instance method `_load_data'",
1917 r = r_object0(arg, 0, extmod);
1919 v = r_leave(v, arg);
1930 v = r_leave(v, arg);
1938 v = path2class(str);
1941 v = r_leave(v, arg);
1952 v = r_leave(v, arg);
1958 v = r_symreal(arg, *ivp);
1962 v = r_symreal(arg, 0);
1965 v = r_leave(v, arg);
1987 return r_object0(arg, 0,
Qnil);
1991 clear_load_arg(
struct load_arg *arg)
2026 marshal_load(
int argc,
VALUE *argv)
2032 proc = argc > 1 ? argv[1] :
Qnil;
2033 return rb_marshal_load_with_proc(port, proc);
2037 rb_marshal_load_with_proc(
VALUE port,
VALUE proc)
2039 int major, minor, infection = 0;
2071 major = r_byte(arg);
2072 minor = r_byte(arg);
2074 clear_load_arg(arg);
2076 \tformat version %d.%d required; %d.%d given",
2080 rb_warn(
"incompatible marshal file format (can be read)\n\ 2081 \tformat version %d.%d required; %d.%d given",
2087 clear_load_arg(arg);
2208 #define rb_intern(str) rb_intern_const(str) 2211 #define set_id(sym) sym = rb_intern_const(name_##sym) 2236 compat_allocator_table(
void)
2238 if (compat_allocator_tbl)
return compat_allocator_tbl;
2240 #undef RUBY_UNTYPED_DATA_WARNING 2241 #define RUBY_UNTYPED_DATA_WARNING 0 2242 compat_allocator_tbl_wrapper =
2245 return compat_allocator_tbl;
2251 return rb_marshal_dump_limited(obj, port, -1);
2257 return rb_marshal_load_with_proc(port,
Qnil);
RUBY_EXTERN VALUE rb_cString
#define ENCINDEX_US_ASCII
int rb_enc_get_index(VALUE obj)
RUBY_EXTERN VALUE rb_cData
#define path2module(path)
void rb_warn(const char *fmt,...)
VALUE rb_ary_pop(VALUE ary)
#define RUBY_TYPED_FREE_IMMEDIATELY
#define load_mantissa(d, buf, len)
VALUE rb_str_equal(VALUE str1, VALUE str2)
void rb_raise(VALUE exc, const char *fmt,...)
VALUE rb_str_cat(VALUE, const char *, long)
VALUE rb_marshal_dump(VALUE obj, VALUE port)
VALUE rb_ary_push(VALUE ary, VALUE item)
int rb_usascii_encindex(void)
VALUE rb_ary_tmp_new(long capa)
VALUE rb_path_to_class(VALUE)
void rb_str_set_len(VALUE, long)
#define RBASIC_SET_CLASS(obj, cls)
int rb_reg_options(VALUE)
int rb_enc_str_coderange(VALUE)
#define RSTRING_GETMEM(str, ptrvar, lenvar)
VALUE rb_ary_clear(VALUE ary)
VALUE rb_obj_alloc(VALUE)
Allocates an instance of klass.
void rb_gc_mark(VALUE ptr)
VALUE rb_io_write(VALUE, VALUE)
STATIC_ASSERT(marshal_infection_is_int, MARSHAL_INFECTION==(int) MARSHAL_INFECTION)
VALUE rb_hash_new_with_size(st_index_t size)
VALUE rb_ivar_defined(VALUE, ID)
void rb_ivar_foreach(VALUE, int(*)(ANYARGS), st_data_t)
#define ENC_CODERANGE_7BIT
#define RHASH_SET_IFNONE(h, ifnone)
VALUE rb_str_buf_cat(VALUE, const char *, long)
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t
#define Data_Wrap_Struct(klass, mark, free, sval)
void rb_hash_foreach(VALUE hash, int(*func)(ANYARGS), VALUE farg)
VALUE rb_struct_members(VALUE)
void rb_prepend_module(VALUE klass, VALUE module)
st_table * st_init_strcasetable(void)
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
#define RB_TYPE_P(obj, type)
VALUE rb_struct_s_members(VALUE)
#define prohibit_ivar(type, str)
#define rb_intern_str(string)
VALUE rb_class_name(VALUE)
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
#define RREGEXP_SRC_PTR(r)
#define SINGLETON_DUMP_UNABLE_P(klass)
void rb_define_const(VALUE, const char *, VALUE)
const char * rb_builtin_type_name(int t)
void rb_gc_register_mark_object(VALUE obj)
rb_alloc_func_t rb_get_alloc_func(VALUE)
RUBY_EXTERN int isinf(double)
VALUE rb_enc_associate_index(VALUE obj, int idx)
int link(const char *, const char *)
char * ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve)
#define HASH_PROC_DEFAULT
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
#define to_be_skipped_id(id)
VALUE rb_str_resize(VALUE, long)
RUBY_EXTERN VALUE rb_cRegexp
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for module.
st_table * rb_init_identtable(void)
int rb_obj_respond_to(VALUE, ID, int)
VALUE rb_class_path(VALUE)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
VALUE rb_class_inherited_p(VALUE mod, VALUE arg)
call-seq: mod <= other -> true, false, or nil
VALUE rb_ivar_set(VALUE, ID, VALUE)
unsigned char buf[MIME_BUF_SIZE]
int rb_utf8_encindex(void)
void rb_mark_tbl(st_table *tbl)
VALUE rb_check_funcall(VALUE, ID, int, const VALUE *)
#define rb_enc_asciicompat(enc)
VALUE rb_str_new_cstr(const char *)
int memcmp(const void *s1, const void *s2, size_t len)
#define INTEGER_PACK_LITTLE_ENDIAN
int rb_respond_to(VALUE, ID)
#define MARSHAL_INFECTION
register unsigned int len
#define load_funcall(arg, obj, sym, argc, argv)
#define StringValueCStr(v)
NORETURN(static inline void io_needed(void))
#define INTEGER_PACK_NEGATIVE
rb_encoding * rb_enc_get(VALUE obj)
#define RSTRUCT_GET(st, idx)
#define RARRAY_AREF(a, i)
#define RBASIC_CLASS(obj)
void rb_mark_set(st_table *tbl)
void rb_extend_object(VALUE obj, VALUE module)
Extend the object with the module.
VALUE rb_check_string_type(VALUE)
#define dump_check_funcall(arg, obj, sym, argc, argv)
#define dump_funcall(arg, obj, sym, argc, argv)
#define TypedData_Make_Struct(klass, type, data_type, sval)
VALUE rb_int2big(SIGNED_VALUE n)
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
#define RREGEXP_SRC_LEN(r)
VALUE rb_reg_new_str(VALUE, int)
int rb_enc_find_index(const char *name)
VALUE rb_str_intern(VALUE)
#define SPECIAL_CONST_P(x)
VALUE rb_define_module(const char *name)
void rb_mark_hash(st_table *tbl)
int rb_enc_str_asciionly_p(VALUE)
VALUE rb_str_buf_new(long)
VALUE(* rb_alloc_func_t)(VALUE)
VALUE rb_marshal_load(VALUE port)
VALUE rb_class_real(VALUE cl)
Looks up the nearest ancestor of cl, skipping singleton classes or module inclusions.
VALUE rb_struct_initialize(VALUE, VALUE)
VALUE(* loader)(VALUE, VALUE)
rb_encoding * rb_enc_from_index(int index)
VALUE rb_str_new(const char *, long)