#include "ruby.h"
#include "rubyio.h"
#include "st.h"
#include "util.h"
#include <math.h>
#include <float.h>
Go to the source code of this file.
Data Structures | |
| struct | dump_arg |
| struct | dump_call_arg |
| struct | load_arg |
Defines | |
| #define | BITSPERSHORT (2*CHAR_BIT) |
| #define | SHORTMASK ((1<<BITSPERSHORT)-1) |
| #define | SHORTDN(x) RSHIFT(x,BITSPERSHORT) |
| #define | SHORTLEN(x) shortlen((x),d) |
| #define | MARSHAL_MAJOR 4 |
| #define | MARSHAL_MINOR 8 |
| #define | TYPE_NIL '0' |
| #define | TYPE_TRUE 'T' |
| #define | TYPE_FALSE 'F' |
| #define | TYPE_FIXNUM 'i' |
| #define | TYPE_EXTENDED 'e' |
| #define | TYPE_UCLASS 'C' |
| #define | TYPE_OBJECT 'o' |
| #define | TYPE_DATA 'd' |
| #define | TYPE_USERDEF 'u' |
| #define | TYPE_USRMARSHAL 'U' |
| #define | TYPE_FLOAT 'f' |
| #define | TYPE_BIGNUM 'l' |
| #define | TYPE_STRING '"' |
| #define | TYPE_REGEXP '/' |
| #define | TYPE_ARRAY '[' |
| #define | TYPE_HASH '{' |
| #define | TYPE_HASH_DEF '}' |
| #define | TYPE_STRUCT 'S' |
| #define | TYPE_MODULE_OLD 'M' |
| #define | TYPE_CLASS 'c' |
| #define | TYPE_MODULE 'm' |
| #define | TYPE_SYMBOL ':' |
| #define | TYPE_SYMLINK ';' |
| #define | TYPE_IVAR 'I' |
| #define | TYPE_LINK '@' |
| #define | load_mantissa(d, buf, len) (d) |
| #define | save_mantissa(d, buf) 0 |
| #define | FLOAT_DIG 17 |
| #define | SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) |
| #define | r_bytes(arg) r_bytes0(r_long(arg), (arg)) |
Functions | |
| int | shortlen (long len, BDIGIT *ds) |
| VALUE | class2path (VALUE klass) |
| void | w_long (long, struct dump_arg *) |
| void | w_nbyte (char *s, int n, struct dump_arg *arg) |
| void | w_byte (char c, struct dump_arg *arg) |
| void | w_bytes (char *s, int n, struct dump_arg *arg) |
| void | w_short (int x, struct dump_arg *arg) |
| void | w_float (double d, struct dump_arg *arg) |
| void | w_symbol (ID id, struct dump_arg *arg) |
| void | w_unique (char *s, struct dump_arg *arg) |
| void | w_object (VALUE, struct dump_arg *, int) |
| int | hash_each (VALUE key, VALUE value, struct dump_call_arg *arg) |
| void | w_extended (VALUE klass, struct dump_arg *arg, int check) |
| void | w_class (int type, VALUE obj, struct dump_arg *arg, int check) |
| void | w_uclass (VALUE obj, VALUE base_klass, struct dump_arg *arg) |
| int | w_obj_each (ID id, VALUE value, struct dump_call_arg *arg) |
| void | w_ivar (st_table *tbl, struct dump_call_arg *arg) |
| VALUE | dump (struct dump_call_arg *arg) |
| VALUE | dump_ensure (struct dump_arg *arg) |
| VALUE | marshal_dump (int argc, VALUE *argv) |
| VALUE | r_object (struct load_arg *arg) |
| int | r_byte (struct load_arg *arg) |
| void | long_toobig (int size) |
| long | r_long (struct load_arg *arg) |
| VALUE | r_bytes0 (long len, struct load_arg *arg) |
| ID | r_symlink (struct load_arg *arg) |
| ID | r_symreal (struct load_arg *arg) |
| ID | r_symbol (struct load_arg *arg) |
| char * | r_unique (struct load_arg *arg) |
| VALUE | r_string (struct load_arg *arg) |
| VALUE | r_entry (VALUE v, struct load_arg *arg) |
| void | r_ivar (VALUE obj, struct load_arg *arg) |
| VALUE | path2class (char *path) |
| VALUE | path2module (char *path) |
| VALUE | r_object0 (struct load_arg *arg, VALUE proc, int *ivp, VALUE extmod) |
| VALUE | load (struct load_arg *arg) |
| VALUE | load_ensure (struct load_arg *arg) |
| VALUE | marshal_load (int argc, VALUE *argv) |
| void | Init_marshal () |
| VALUE | rb_marshal_dump (VALUE obj, VALUE port) |
| VALUE | rb_marshal_load (VALUE port) |
Variables | |
| ID | s_dump |
| ID | s_load |
| ID | s_mdump |
| ID | s_mload |
| ID | s_dump_data |
| ID | s_load_data |
| ID | s_alloc |
| ID | s_getc |
| ID | s_read |
| ID | s_write |
| ID | s_binmode |
|
|
|
|
|
Definition at line 293 of file marshal.c. Referenced by w_float(). |
|
|
Definition at line 286 of file marshal.c. Referenced by r_object0(). |
|
|
Definition at line 51 of file marshal.c. Referenced by Init_marshal(), marshal_dump(), and marshal_load(). |
|
|
Definition at line 52 of file marshal.c. Referenced by Init_marshal(), marshal_dump(), and marshal_load(). |
|
|
Definition at line 865 of file marshal.c. Referenced by r_object0(), r_string(), and r_symreal(). |
|
|
Definition at line 287 of file marshal.c. Referenced by w_float(). |
|
|
Definition at line 28 of file marshal.c. Referenced by shortlen(), and w_object(). |
|
|
Definition at line 48 of file marshal.c. Referenced by w_object(). |
|
|
Definition at line 27 of file marshal.c. Referenced by w_object(). |
|
|
Definition at line 828 of file marshal.c. Referenced by r_long(). |
|
|
Definition at line 69 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 66 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 74 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 62 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 59 of file marshal.c. Referenced by r_object0(), and w_extended(). |
|
|
Definition at line 56 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 57 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 65 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 70 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 71 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 80 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 81 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 75 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 73 of file marshal.c. Referenced by r_object0(). |
|
|
Definition at line 54 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 61 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 68 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 67 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 72 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 77 of file marshal.c. Referenced by r_object0(), and w_symbol(). |
|
|
Definition at line 78 of file marshal.c. Referenced by r_object0(), r_symbol(), and w_symbol(). |
|
|
Definition at line 55 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 60 of file marshal.c. Referenced by r_object0(), and w_uclass(). |
|
|
Definition at line 63 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 64 of file marshal.c. Referenced by r_object0(), and w_object(). |
|
|
Definition at line 102 of file marshal.c. References rb_class_path(), rb_class_real(), rb_eTypeError, rb_path2class(), rb_raise(), RSTRING, T_CLASS, TYPE, and VALUE. Referenced by w_class(), w_object(), and w_uclass(). |
|
|
Definition at line 678 of file marshal.c. References rb_io_write(), rb_str_resize(), and w_object(). Referenced by marshal_dump(). |
|
|
Definition at line 690 of file marshal.c. References OBJ_TAINT, and st_free_table(). Referenced by marshal_dump(). |
|
||||||||||||||||
|
Definition at line 359 of file marshal.c. References ST_CONTINUE, VALUE, and w_object(). Referenced by w_object(). |
|
|
Definition at line 1468 of file marshal.c. References INT2FIX, marshal_dump(), marshal_load(), MARSHAL_MAJOR, MARSHAL_MINOR, rb_define_const(), rb_define_module(), rb_define_module_function(), rb_intern(), s_alloc, s_binmode, s_dump, s_dump_data, s_getc, s_load, s_load_data, s_mdump, s_mload, s_read, s_write, and VALUE. Referenced by rb_call_inits(). |
|
|
Definition at line 1360 of file marshal.c. References r_object(). Referenced by dln_load(), and marshal_load(). |
|
|
Definition at line 1367 of file marshal.c. References st_free_table(). Referenced by marshal_load(). |
|
|
Definition at line 816 of file marshal.c. References rb_eTypeError, and rb_raise(). Referenced by r_long(). |
|
||||||||||||
|
Definition at line 728 of file marshal.c. References dump_call_arg::arg, dump_arg::data, dump_arg::dest, dump(), dump_ensure(), FIX2INT, FIXNUM_P, dump_call_arg::limit, MARSHAL_MAJOR, MARSHAL_MINOR, NIL_P, NUM2INT, dump_call_arg::obj, Qfalse, Qnil, rb_ensure(), rb_eTypeError, rb_funcall2(), rb_raise(), rb_respond_to(), rb_scan_args(), rb_str_buf_new(), s_binmode, s_write, st_init_numtable(), dump_arg::str, dump_arg::symbols, dump_arg::taint, VALUE, and w_byte(). Referenced by Init_marshal(), and rb_marshal_dump(). |
|
||||||||||||
|
Definition at line 1386 of file marshal.c. References load_arg::data, load(), load_ensure(), MARSHAL_MAJOR, MARSHAL_MINOR, NIL_P, OBJ_TAINTED, load_arg::offset, load_arg::proc, Qtrue, r_byte(), rb_ensure(), rb_eTypeError, rb_funcall2(), rb_hash_new(), rb_intern(), rb_raise(), rb_respond_to(), rb_scan_args(), rb_warn(), RTEST, ruby_verbose, s_binmode, s_getc, s_read, load_arg::src, st_init_numtable(), StringValue, load_arg::symbols, load_arg::taint, and VALUE. Referenced by Init_marshal(), and rb_marshal_load(). |
|
|
Definition at line 974 of file marshal.c. References rb_eArgError, rb_path2class(), rb_raise(), T_CLASS, TYPE, and VALUE. Referenced by r_object0(). |
|
|
Definition at line 986 of file marshal.c. References rb_eArgError, rb_path2class(), rb_raise(), T_MODULE, TYPE, and VALUE. Referenced by r_object0(). |
|
|
Definition at line 793 of file marshal.c. References FIX2INT, NIL_P, rb_eArgError, rb_eof_error(), rb_funcall2(), rb_raise(), RSTRING, s_getc, T_STRING, TYPE, and VALUE. Referenced by marshal_load(), r_long(), r_object0(), and r_symbol(). |
|
||||||||||||
|
Definition at line 868 of file marshal.c. References LONG2NUM, NIL_P, OBJ_TAINTED, Qtrue, rb_eArgError, rb_funcall2(), rb_raise(), rb_str_new(), RSTRING, s_read, StringValue, T_STRING, TYPE, and VALUE. Referenced by r_object0(). |
|
||||||||||||
|
Definition at line 947 of file marshal.c. References INT2FIX, OBJ_TAINT, rb_hash_aset(), RHASH, and VALUE. Referenced by r_object0(). |
|
||||||||||||
|
Definition at line 957 of file marshal.c. References ID, r_long(), r_object(), r_symbol(), rb_ivar_set(), and VALUE. Referenced by r_object0(). |
|
|
Definition at line 832 of file marshal.c. References long_toobig(), r_byte(), and SIGN_EXTEND_CHAR. Referenced by r_ivar(), r_object0(), and r_symlink(). |
|
|
Definition at line 1353 of file marshal.c. References Qnil, and r_object0(). Referenced by load(), r_ivar(), and r_object0(). |
|
||||||||||||||||||||
|
|
Definition at line 940 of file marshal.c. References r_bytes. Referenced by r_object0(). |
|
|
Definition at line 923 of file marshal.c. References r_byte(), r_symlink(), r_symreal(), and TYPE_SYMLINK. Referenced by r_ivar(), r_object0(), and r_unique(). |
|
|
Definition at line 898 of file marshal.c. References ID, r_long(), rb_eArgError, rb_raise(), and st_lookup(). Referenced by r_object0(), and r_symbol(). |
|
|
Definition at line 911 of file marshal.c. References ID, r_bytes, rb_intern(), RSTRING, and st_insert(). Referenced by r_object0(), and r_symbol(). |
|
|
Definition at line 933 of file marshal.c. References r_symbol(), and rb_id2name(). Referenced by r_object0(). |
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 137 of file marshal.c. References w_nbyte(). Referenced by marshal_dump(), w_class(), w_extended(), w_long(), w_object(), w_short(), w_symbol(), and w_uclass(). |
|
||||||||||||||||
|
Definition at line 145 of file marshal.c. References w_long(), and w_nbyte(). Referenced by w_float(), w_object(), and w_symbol(). |
|
||||||||||||||||||||
|
Definition at line 392 of file marshal.c. References class2path(), CLASS_OF, rb_class_real(), RSTRING, VALUE, w_byte(), w_extended(), and w_unique(). Referenced by w_object(). |
|
||||||||||||||||
|
Definition at line 369 of file marshal.c. References BUILTIN_TYPE, FL_SINGLETON, FL_TEST, rb_class2name(), rb_eTypeError, rb_raise(), RBASIC, RCLASS, T_ICLASS, TYPE_EXTENDED, VALUE, w_byte(), and w_unique(). Referenced by w_class(), and w_uclass(). |
|
||||||||||||
|
Definition at line 297 of file marshal.c. References FLOAT_DIG, isinf(), isnan(), save_mantissa, and w_bytes(). Referenced by w_object(). |
|
||||||||||||
|
Definition at line 434 of file marshal.c. References st_data_t, st_foreach_safe(), w_long(), and w_obj_each(). Referenced by w_object(). |
|
||||||||||||
|
Definition at line 164 of file marshal.c. References rb_eTypeError, rb_raise(), RSHIFT, and w_byte(). Referenced by w_bytes(), w_ivar(), w_object(), and w_symbol(). |
|
||||||||||||||||
|
Definition at line 122 of file marshal.c. References OBJ_TAINT, rb_io_write(), rb_str_buf_cat(), rb_str_resize(), RSTRING, and VALUE. |
|
||||||||||||||||
|
Definition at line 423 of file marshal.c. References ID, ST_CONTINUE, VALUE, w_object(), and w_symbol(). Referenced by w_ivar(). |
|
||||||||||||||||
|
||||||||||||
|
Definition at line 155 of file marshal.c. References w_byte(). Referenced by w_object(). |
| ||||||||||||