Files | |
| file | intern.h |
| file | ruby.h |
Modules | |
| Array | |
| Numeric | |
| Class | |
| Compare | |
| Error | |
| Eval | |
| File | |
| Garbage Collector | |
| Hash | |
| Input / Output | |
| Marshal | |
| Object | |
| Parse | |
| Process | |
| Range | |
| Regular Expression | |
| Ruby | |
| Signal | |
| sprintf | |
| String | |
| Struct | |
| Time | |
| Variable | |
| Version | |
| Ruby Interpretor Interface | |
Data Structures | |
| struct | RArray |
| struct | RBasic |
| struct | RBignum |
| struct | RClass |
| struct | RData |
| struct | RFile |
| struct | RFloat |
| struct | RHash |
| struct | RObject |
| struct | RRegexp |
| struct | RString |
| struct | RStruct |
Symbol / ID Coversion Macros | |
| #define | SYMBOL_FLAG 0x0e |
| #define | SYMBOL_P(x) (((VALUE)(x)&0xff)==SYMBOL_FLAG) |
| #define | ID2SYM(x) ((VALUE)(((long)(x))<<8|SYMBOL_FLAG)) |
| #define | SYM2ID(x) RSHIFT((long)x,8) |
Special Contants | |
| Non-zero and non-fixnum constants. | |
| #define | Qfalse 0 |
| #define | Qtrue 2 |
| #define | Qnil 4 |
| #define | Qundef 6 |
Ruby Built-In Types | |
| #define | T_NONE 0x00 |
| #define | T_NIL 0x01 |
| #define | T_OBJECT 0x02 |
| #define | T_CLASS 0x03 |
| #define | T_ICLASS 0x04 |
| #define | T_MODULE 0x05 |
| #define | T_FLOAT 0x06 |
| #define | T_STRING 0x07 |
| #define | T_REGEXP 0x08 |
| #define | T_ARRAY 0x09 |
| #define | T_FIXNUM 0x0a |
| #define | T_HASH 0x0b |
| #define | T_STRUCT 0x0c |
| #define | T_BIGNUM 0x0d |
| #define | T_FILE 0x0e |
| #define | T_TRUE 0x20 |
| #define | T_FALSE 0x21 |
| #define | T_DATA 0x22 |
| #define | T_MATCH 0x23 |
| #define | T_SYMBOL 0x24 |
| #define | T_BLKTAG 0x3b |
| #define | T_UNDEF 0x3c |
| #define | T_VARMAP 0x3d |
| #define | T_SCOPE 0x3e |
| #define | T_NODE 0x3f |
| #define | T_MASK 0x3f |
Ruby Cast Macros | |
| #define | R_CAST(st) (struct st*) |
| #define | RBASIC(obj) (R_CAST(RBasic)(obj)) |
| #define | ROBJECT(obj) (R_CAST(RObject)(obj)) |
| #define | RCLASS(obj) (R_CAST(RClass)(obj)) |
| #define | RMODULE(obj) RCLASS(obj) |
| #define | RFLOAT(obj) (R_CAST(RFloat)(obj)) |
| #define | RSTRING(obj) (R_CAST(RString)(obj)) |
| #define | RREGEXP(obj) (R_CAST(RRegexp)(obj)) |
| #define | RARRAY(obj) (R_CAST(RArray)(obj)) |
| #define | RHASH(obj) (R_CAST(RHash)(obj)) |
| #define | RDATA(obj) (R_CAST(RData)(obj)) |
| #define | RSTRUCT(obj) (R_CAST(RStruct)(obj)) |
| #define | RBIGNUM(obj) (R_CAST(RBignum)(obj)) |
| #define | RFILE(obj) (R_CAST(RFile)(obj)) |
Freeze Macros | |
| #define | OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE) |
| #define | OBJ_FREEZE(x) FL_SET((x), FL_FREEZE) |
Memory Functions | |
| #define | ALLOC_N(type, n) (type*)xmalloc(sizeof(type)*(n)) |
| #define | ALLOC(type) (type*)xmalloc(sizeof(type)) |
| #define | REALLOC_N(var, type, n) (var)=(type*)xrealloc((char*)(var),sizeof(type)*(n)) |
| #define | ALLOCA_N(type, n) (type*)alloca(sizeof(type)*(n)) |
| #define | MEMZERO(p, type, n) memset((p), 0, sizeof(type)*(n)) |
| #define | MEMCPY(p1, p2, type, n) memcpy((p1), (p2), sizeof(type)*(n)) |
| #define | MEMMOVE(p1, p2, type, n) memmove((p1), (p2), sizeof(type)*(n)) |
| #define | MEMCMP(p1, p2, type, n) memcmp((p1), (p2), sizeof(type)*(n)) |
Ruby Modules | |
| RUBY_EXTERN VALUE | rb_mKernel |
| RUBY_EXTERN VALUE | rb_mComparable |
| RUBY_EXTERN VALUE | rb_mEnumerable |
| RUBY_EXTERN VALUE | rb_mPrecision |
| RUBY_EXTERN VALUE | rb_mErrno |
| RUBY_EXTERN VALUE | rb_mFileTest |
| RUBY_EXTERN VALUE | rb_mGC |
| RUBY_EXTERN VALUE | rb_mMath |
| RUBY_EXTERN VALUE | rb_mProcess |
Ruby Classes | |
| RUBY_EXTERN VALUE | rb_cObject |
| RUBY_EXTERN VALUE | rb_cArray |
| RUBY_EXTERN VALUE | rb_cBignum |
| RUBY_EXTERN VALUE | rb_cClass |
| RUBY_EXTERN VALUE | rb_cDir |
| RUBY_EXTERN VALUE | rb_cData |
| RUBY_EXTERN VALUE | rb_cFalseClass |
| RUBY_EXTERN VALUE | rb_cFile |
| RUBY_EXTERN VALUE | rb_cFixnum |
| RUBY_EXTERN VALUE | rb_cFloat |
| RUBY_EXTERN VALUE | rb_cHash |
| RUBY_EXTERN VALUE | rb_cInteger |
| RUBY_EXTERN VALUE | rb_cIO |
| RUBY_EXTERN VALUE | rb_cModule |
| RUBY_EXTERN VALUE | rb_cNilClass |
| RUBY_EXTERN VALUE | rb_cNumeric |
| RUBY_EXTERN VALUE | rb_cProc |
| RUBY_EXTERN VALUE | rb_cRange |
| RUBY_EXTERN VALUE | rb_cRegexp |
| RUBY_EXTERN VALUE | rb_cString |
| RUBY_EXTERN VALUE | rb_cSymbol |
| RUBY_EXTERN VALUE | rb_cThread |
| RUBY_EXTERN VALUE | rb_cTime |
| RUBY_EXTERN VALUE | rb_cTrueClass |
| RUBY_EXTERN VALUE | rb_cStruct |
Ruby Exceptions | |
| RUBY_EXTERN VALUE | rb_eException |
| RUBY_EXTERN VALUE | rb_eStandardError |
| RUBY_EXTERN VALUE | rb_eSystemExit |
| RUBY_EXTERN VALUE | rb_eInterrupt |
| RUBY_EXTERN VALUE | rb_eSignal |
| RUBY_EXTERN VALUE | rb_eFatal |
| RUBY_EXTERN VALUE | rb_eArgError |
| RUBY_EXTERN VALUE | rb_eEOFError |
| RUBY_EXTERN VALUE | rb_eIndexError |
| RUBY_EXTERN VALUE | rb_eRangeError |
| RUBY_EXTERN VALUE | rb_eIOError |
| RUBY_EXTERN VALUE | rb_eRuntimeError |
| RUBY_EXTERN VALUE | rb_eSecurityError |
| RUBY_EXTERN VALUE | rb_eSystemCallError |
| RUBY_EXTERN VALUE | rb_eTypeError |
| RUBY_EXTERN VALUE | rb_eZeroDivError |
| RUBY_EXTERN VALUE | rb_eNotImpError |
| RUBY_EXTERN VALUE | rb_eNoMemError |
| RUBY_EXTERN VALUE | rb_eNoMethodError |
| RUBY_EXTERN VALUE | rb_eFloatDomainError |
| RUBY_EXTERN VALUE | rb_eScriptError |
| RUBY_EXTERN VALUE | rb_eNameError |
| RUBY_EXTERN VALUE | rb_eSyntaxError |
| RUBY_EXTERN VALUE | rb_eLoadError |
Other Constants | |
| RUBY_EXTERN VALUE | rb_stdin |
| RUBY_EXTERN VALUE | rb_stdout |
| RUBY_EXTERN VALUE | rb_stderr |
| RUBY_EXTERN VALUE | ruby_errinfo |
Defines | |
| #define | ID_ALLOCATOR 1 |
| #define | ISASCII(c) isascii((int)(unsigned char)(c)) |
| #define | ISPRINT(c) (ISASCII(c) && isprint((int)(unsigned char)(c))) |
| #define | ISSPACE(c) (ISASCII(c) && isspace((int)(unsigned char)(c))) |
| #define | ISUPPER(c) (ISASCII(c) && isupper((int)(unsigned char)(c))) |
| #define | ISLOWER(c) (ISASCII(c) && islower((int)(unsigned char)(c))) |
| #define | ISALNUM(c) (ISASCII(c) && isalnum((int)(unsigned char)(c))) |
| #define | ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c))) |
| #define | ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c))) |
| #define | ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c))) |
| #define | NORETURN_STYLE_NEW 1 |
| #define | LONG_MIN (-LONG_MAX-1) |
| #define | CHAR_BIT 8 |
| #define | LLONG_MAX 9223372036854775807LL |
| #define | LLONG_MIN (-LLONG_MAX-1) |
| #define | FIXNUM_MAX (LONG_MAX>>1) |
| #define | FIXNUM_MIN RSHIFT((long)LONG_MIN,1) |
| #define | FIXNUM_FLAG 0x01 |
| #define | IMMEDIATE_MASK 0x03 |
| #define | IMMEDIATE_P(x) ((VALUE)(x) & IMMEDIATE_MASK) |
| #define | RTEST(v) (((VALUE)(v) & ~Qnil) != 0) |
| #define | NIL_P(v) ((VALUE)(v) == Qnil) |
| #define | CLASS_OF(v) rb_class_of((VALUE)(v)) |
| #define | BUILTIN_TYPE(x) (((struct RBasic*)(x))->flags & T_MASK) |
| #define | TYPE(x) rb_type((VALUE)(x)) |
| #define | Check_Type(v, t) rb_check_type((VALUE)(v),t) |
| #define | rb_safe_level() (ruby_safe_level) |
| #define | NEWOBJ(obj, type) type *obj = (type*)rb_newobj() |
| #define | OBJSETUP(obj, c, t) |
| #define | CLONESETUP(clone, obj) |
| #define | DUPSETUP(dup, obj) |
| #define | ELTS_SHARED FL_USER2 |
| #define | DATA_PTR(dta) (RDATA(dta)->data) |
| #define | Data_Wrap_Struct(klass, mark, free, sval) rb_data_object_alloc(klass,sval,(RUBY_DATA_FUNC)mark,(RUBY_DATA_FUNC)free) |
| #define | Data_Make_Struct(klass, type, mark, free, sval) |
| #define | Data_Get_Struct(obj, type, sval) |
| #define | FL_SINGLETON FL_USER0 |
| #define | FL_MARK (1<<6) |
| #define | FL_FINALIZE (1<<7) |
| #define | FL_TAINT (1<<8) |
| #define | FL_EXIVAR (1<<9) |
| #define | FL_FREEZE (1<<10) |
| #define | FL_USHIFT 11 |
| #define | FL_USER0 (1<<(FL_USHIFT+0)) |
| #define | FL_USER1 (1<<(FL_USHIFT+1)) |
| #define | FL_USER2 (1<<(FL_USHIFT+2)) |
| #define | FL_USER3 (1<<(FL_USHIFT+3)) |
| #define | FL_USER4 (1<<(FL_USHIFT+4)) |
| #define | FL_USER5 (1<<(FL_USHIFT+5)) |
| #define | FL_USER6 (1<<(FL_USHIFT+6)) |
| #define | FL_USER7 (1<<(FL_USHIFT+7)) |
| #define | FL_UMASK (0xff<<FL_USHIFT) |
| #define | SPECIAL_CONST_P(x) (IMMEDIATE_P(x) || !RTEST(x)) |
| #define | FL_ABLE(x) (!SPECIAL_CONST_P(x)) |
| #define | FL_TEST(x, f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0) |
| #define | FL_SET(x, f) do {if (FL_ABLE(x)) RBASIC(x)->flags |= (f);} while (0) |
| #define | FL_UNSET(x, f) do {if (FL_ABLE(x)) RBASIC(x)->flags &= ~(f);} while (0) |
| #define | FL_REVERSE(x, f) do {if (FL_ABLE(x)) RBASIC(x)->flags ^= (f);} while (0) |
| #define | OBJ_TAINTED(x) FL_TEST((x), FL_TAINT) |
| #define | OBJ_TAINT(x) FL_SET((x), FL_TAINT) |
| #define | OBJ_INFECT(x, s) do {if (FL_ABLE(x) && FL_ABLE(s)) RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT;} while (0) |
| #define | is_ruby_native_thread() (1) |
Typedefs | |
| typedef unsigned long | VALUE |
| typedef unsigned long | ID |
| typedef void(* | RUBY_DATA_FUNC )(void *) |
Functions | |
| void | rb_check_type (VALUE, int) |
| void | rb_secure (int) |
| void | rb_set_safe_level (int) |
| void | rb_secure_update (VALUE) |
| VALUE | rb_newobj (void) |
| VALUE | rb_data_object_alloc (VALUE, void *, RUBY_DATA_FUNC, RUBY_DATA_FUNC) |
| VALUE | rb_class_of (VALUE obj) |
| int | rb_type (VALUE obj) |
| int | rb_special_const_p (VALUE obj) |
Variables | |
| RUBY_EXTERN int | ruby_safe_level |
|
|
Definition at line 504 of file ruby.h. Referenced by add_modules(), frame_dup(), local_push(), make_regexp(), match_alloc(), rb_add_event_hook(), rb_alias_variable(), rb_f_trace_var(), rb_gc_register_address(), rb_global_entry(), rb_io_reopen(), rb_reg_to_s(), rb_set_end_proc(), rb_stat_init(), rb_stat_init_copy(), and stat_new_0(). |
|
|
Definition at line 503 of file ruby.h. Referenced by add_modules(), ary_new(), bignew_1(), blk_copy_prev(), copy_node_scope(), extract_path(), frame_dup(), local_append(), make_regexp(), name_err_mesg_new(), newtok(), r_object0(), rand_init(), random_seed(), rb_ary_modify(), rb_ary_s_create(), rb_reg_initialize(), rb_source_filename(), rb_str_buf_new(), rb_struct_init_copy(), ruby_setenv(), scope_dup(), str_make_independent(), str_new(), struct_alloc(), top_local_init(), and top_local_setup(). |
|
|
Definition at line 507 of file ruby.h. Referenced by encodes(), global_id(), load_file(), method_missing(), moreswitches(), proc_exec_n(), proc_exec_v(), proc_getgroups(), proc_invoke(), proc_setgroups(), rb_apply(), rb_attr(), rb_cstr_to_dbl(), rb_eval(), rb_id2name(), rb_intern(), rb_io_inspect(), rb_io_s_sysopen(), rb_proc_exec(), rb_provided(), rb_str_format(), rb_str_to_dbl(), rb_str_to_inum(), rb_struct_new(), sys_fail2(), vafuncall(), and yyerror(). |
|
|
Check if x is a Built-In Type. Definition at line 222 of file ruby.h. Referenced by class_instance_method_list(), gc_sweep(), id2ref(), include_class_new(), mod_av_set(), rb_const_defined_0(), rb_const_get_0(), rb_gc_call_finalizer_at_exit(), rb_include_module(), rb_make_metaclass(), rb_mod_ancestors(), rb_mod_include_p(), rb_mod_included_modules(), rb_singleton_class_clone(), rb_type(), unknown_node(), w_extended(), and w_object(). |
|
|
Definition at line 84 of file ruby.h. Referenced by fix_aref(), fix_lshift(), fix_rshift(), proc_to_s(), rb_big2str(), rb_cstr_to_inum(), rb_fix2str(), rb_memsearch(), and rb_str_sum(). |
|
|
Raises an error if v does not have type t. See Built-In Types. Definition at line 232 of file ruby.h. Referenced by autoload_file(), check_autoload_table(), get_pat(), match_setter(), prec_included(), proc_setgroups(), rb_class_new(), rb_data_object_alloc(), rb_define_alloc_func(), rb_f_kill(), rb_f_select(), rb_find_file(), rb_find_file_ext(), rb_include_module(), rb_mod_append_features(), rb_mod_include(), rb_mod_include_p(), rb_obj_extend(), and rb_undef_alloc_func(). |
|
|
|
Value: do {\ OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\ rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\ if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\ } while (0) Definition at line 329 of file ruby.h. Referenced by method_clone(), and proc_clone(). |
|
|
Value: do {\ Check_Type(obj, T_DATA); \ sval = (type*)DATA_PTR(obj);\ } while (0) Definition at line 427 of file ruby.h. Referenced by block_pass(), dir_initialize(), eval(), get_stat(), method_arity(), method_call(), method_clone(), method_eq(), method_inspect(), method_proc(), method_unbind(), name_err_mesg_to_str(), proc_arity(), proc_binding(), proc_clone(), proc_dup(), proc_eq(), proc_invoke(), proc_to_s(), rb_mod_define_method(), rb_proc_new(), thgroup_add(), thgroup_enclose(), thgroup_enclosed_p(), thgroup_list(), and umethod_bind(). |
|
|
Value: (\
sval = ALLOC(type),\
memset(sval, 0, sizeof(type)),\
Data_Wrap_Struct(klass,mark,free,sval)\
)
Definition at line 421 of file ruby.h. Referenced by dir_s_alloc(), dir_s_open(), method_clone(), method_unbind(), mnew(), proc_alloc(), proc_binding(), proc_clone(), proc_dup(), rb_f_binding(), thgroup_s_alloc(), time_s_alloc(), and umethod_bind(). |
|
|
Definition at line 409 of file ruby.h. Referenced by autoload_delete(), autoload_file(), check_autoload_table(), gc_mark_children(), obj_free(), rb_autoload(), rb_gc_call_finalizer_at_exit(), rb_stat_init(), and rb_stat_init_copy(). |
|
|
Definition at line 418 of file ruby.h. Referenced by name_err_mesg_new(), rb_autoload(), rb_callcc(), rb_thread_alloc(), and stat_new_0(). |
|
|
Value: do {\ OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\ if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\ } while (0) Definition at line 334 of file ruby.h. Referenced by rb_ary_dup(). |
|
|
Definition at line 361 of file ruby.h. Referenced by ary_make_shared(), gc_mark_children(), obj_free(), rb_ary_modify(), rb_ary_pop(), rb_ary_replace(), rb_ary_subseq(), rb_check_string_type(), rb_str_associate(), rb_str_dup_frozen(), rb_str_new4(), rb_str_replace(), rb_str_shared_replace(), rb_string_value(), str_independent(), str_new3(), and str_new4(). |
|
|
Definition at line 119 of file ruby.h. Referenced by id2ref(), and rb_obj_id(). |
|
|
Largest value that can be represented by a Fixnum. Definition at line 115 of file ruby.h. Referenced by rb_Integer(). |
|
|
Smallest value that can be represented by a Fixnum. Definition at line 117 of file ruby.h. Referenced by rb_Integer(). |
|
|
|
|
|
Definition at line 467 of file ruby.h. Referenced by gc_mark_children(), generic_ivar_set(), init_copy(), ivar_get(), obj_free(), rb_generic_ivar_table(), rb_ivar_defined(), rb_obj_instance_variables(), rb_obj_remove_instance_variable(), time_dump(), and time_load(). |
|
|
Definition at line 465 of file ruby.h. Referenced by call_final(), define_final(), gc_sweep(), rb_gc_call_finalizer_at_exit(), rb_gc_copy_finalizer(), and rb_obj_clone(). |
|
|
Definition at line 468 of file ruby.h. Referenced by rb_obj_clone(). |
|
|
Definition at line 464 of file ruby.h. Referenced by gc_mark(), gc_mark_all(), gc_mark_children(), and gc_sweep(). |
|
|
|
|
|
|
|
Definition at line 466 of file ruby.h. Referenced by env_reject_bang(), init_copy(), proc_options(), rb_autoload(), rb_obj_clone(), rb_obj_untaint(), rb_reg_search(), and rb_singleton_class(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 474 of file ruby.h. Referenced by w_object(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 165 of file ruby.h. Referenced by call_trace_func(), const_missing(), fix_to_sym(), localjump_error(), make_struct(), method_missing(), r_object0(), rb_add_method(), rb_alias(), rb_catch(), rb_f_catch(), rb_f_throw(), rb_name_class(), rb_name_error(), rb_obj_respond_to(), rb_str_intern(), rb_struct_define(), rb_struct_getmember(), rb_struct_s_def(), rb_throw(), rb_undef(), remove_method(), symbols_i(), thread_keys_i(), and yyparse(). |
|
|
Definition at line 4 of file intern.h. Referenced by backtrace(), call_trace_func(), method_entry(), method_missing(), rb_add_method(), rb_define_alloc_func(), rb_obj_alloc(), and rb_undef_alloc_func(). |
|
|
|
|
|
|
|
|
Definition at line 766 of file ruby.h. Referenced by garbage_collect(), and rb_thread_schedule(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|