Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

struct.c File Reference

#include "ruby.h"
#include "env.h"
#include <stdarg.h>

Go to the source code of this file.

Defines

#define va_init_list(a, b)   va_start(a,b)

Functions

VALUE struct_alloc (VALUE)
VALUE rb_struct_iv_get (VALUE c, char *name)
VALUE rb_struct_s_members (VALUE klass)
VALUE rb_struct_members (VALUE s)
VALUE rb_struct_s_members_m (VALUE klass)
VALUE rb_struct_members_m (VALUE obj)
VALUE rb_struct_getmember (VALUE obj, ID id)
VALUE rb_struct_ref (VALUE obj)
VALUE rb_struct_ref0 (VALUE obj)
VALUE rb_struct_ref1 (VALUE obj)
VALUE rb_struct_ref2 (VALUE obj)
VALUE rb_struct_ref3 (VALUE obj)
VALUE rb_struct_ref4 (VALUE obj)
VALUE rb_struct_ref5 (VALUE obj)
VALUE rb_struct_ref6 (VALUE obj)
VALUE rb_struct_ref7 (VALUE obj)
VALUE rb_struct_ref8 (VALUE obj)
VALUE rb_struct_ref9 (VALUE obj)
void rb_struct_modify (VALUE s)
VALUE rb_struct_set (VALUE obj, VALUE val)
VALUE make_struct (VALUE name, VALUE members, VALUE klass)
VALUE rb_struct_define (const char *name,...)
VALUE rb_struct_s_def (int argc, VALUE *argv, VALUE klass)
VALUE rb_struct_initialize (VALUE self, VALUE values)
VALUE rb_struct_alloc (VALUE klass, VALUE values)
VALUE rb_struct_new (VALUE klass,...)
VALUE rb_struct_each (VALUE s)
VALUE rb_struct_each_pair (VALUE s)
VALUE inspect_struct (VALUE s)
VALUE rb_struct_inspect (VALUE s)
VALUE rb_struct_to_a (VALUE s)
VALUE rb_struct_init_copy (VALUE copy, VALUE s)
VALUE rb_struct_aref_id (VALUE s, ID id)
VALUE rb_struct_aref (VALUE s, VALUE idx)
VALUE rb_struct_aset_id (VALUE s, ID id, VALUE val)
VALUE rb_struct_aset (VALUE s, VALUE idx, VALUE val)
VALUE struct_entry (VALUE, long)
VALUE rb_struct_values_at (int argc, VALUE *argv, VALUE s)
VALUE rb_struct_select (int argc, VALUE *argv, VALUE s)
VALUE rb_struct_equal (VALUE s, VALUE s2)
VALUE rb_struct_hash (VALUE s)
VALUE rb_struct_eql (VALUE s, VALUE s2)
VALUE rb_struct_size (VALUE s)
void Init_Struct ()

Variables

VALUE rb_cStruct
VALUE(* ref_func [10])()=


Define Documentation

#define va_init_list a,
 )     va_start(a,b)
 

Definition at line 231 of file struct.c.


Function Documentation

void Init_Struct void   ) 
 

Definition at line 892 of file struct.c.

References rb_cObject, rb_cStruct, rb_define_class(), rb_define_method(), rb_define_singleton_method(), rb_include_module(), rb_mEnumerable, rb_struct_aref(), rb_struct_aset(), rb_struct_each(), rb_struct_each_pair(), rb_struct_eql(), rb_struct_equal(), rb_struct_hash(), rb_struct_init_copy(), rb_struct_initialize(), rb_struct_inspect(), rb_struct_members_m(), rb_struct_s_def(), rb_struct_select(), rb_struct_size(), rb_struct_to_a(), rb_struct_values_at(), and rb_undef_alloc_func().

Referenced by rb_call_inits().

VALUE inspect_struct VALUE  s  )  [static]
 

Definition at line 470 of file struct.c.

References ID, OBJ_INFECT, RARRAY, rb_class2name(), rb_id2name(), rb_inspect(), rb_is_const_id(), rb_is_local_id(), rb_obj_class(), rb_str_append(), rb_str_buf_new2(), rb_str_cat2(), rb_struct_members(), RSTRUCT, SYM2ID, and VALUE.

Referenced by rb_struct_inspect().

VALUE make_struct VALUE  name,
VALUE  members,
VALUE  klass
[static]
 

Definition at line 181 of file struct.c.

References ID, ID2SYM, LONG2NUM, name, NIL_P, OBJ_FREEZE, RARRAY, rb_class_inherited(), rb_class_new(), rb_class_new_instance(), rb_const_defined_at(), rb_define_alloc_func(), rb_define_class_under(), rb_define_method_id(), rb_define_singleton_method(), rb_id2name(), rb_id_attrset(), rb_intern(), rb_is_const_id(), rb_is_local_id(), rb_iv_set(), rb_make_metaclass(), rb_mod_remove_const(), rb_name_error(), rb_struct_ref(), rb_struct_s_members_m(), rb_struct_set(), rb_warn(), RBASIC, ref_func, StringValuePtr, struct_alloc(), SYM2ID, and VALUE.

Referenced by rb_struct_define(), and rb_struct_s_def().

VALUE rb_struct_aref_id VALUE  s,
ID  id
[static]
 

Definition at line 568 of file struct.c.

References ID, Qnil, RARRAY, rb_id2name(), rb_name_error(), rb_struct_members(), RSTRUCT, SYM2ID, and VALUE.

Referenced by rb_struct_aref().

VALUE rb_struct_aset_id VALUE  s,
ID  id,
VALUE  val
[static]
 

Definition at line 627 of file struct.c.

References ID, RARRAY, rb_eTypeError, rb_id2name(), rb_name_error(), rb_raise(), rb_struct_members(), rb_struct_modify(), RSTRUCT, SYM2ID, and VALUE.

Referenced by rb_struct_aset().

VALUE rb_struct_each VALUE  s  )  [static]
 

Definition at line 426 of file struct.c.

References rb_yield(), RSTRUCT, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_each_pair VALUE  s  )  [static]
 

Definition at line 456 of file struct.c.

References rb_ary_entry(), rb_struct_members(), rb_yield_values(), RSTRUCT, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_eql VALUE  s,
VALUE  s2
[static]
 

Definition at line 839 of file struct.c.

References Qfalse, Qtrue, rb_bug(), rb_eql(), rb_obj_class(), RSTRUCT, T_STRUCT, TYPE, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_equal VALUE  s,
VALUE  s2
[static]
 

Definition at line 789 of file struct.c.

References Qfalse, Qtrue, rb_bug(), rb_equal(), rb_obj_class(), RSTRUCT, T_STRUCT, TYPE, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_hash VALUE  s  )  [static]
 

Definition at line 815 of file struct.c.

References LONG2FIX, NUM2LONG, rb_hash(), rb_obj_class(), RSTRUCT, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_init_copy VALUE  copy,
VALUE  s
[static]
 

Definition at line 552 of file struct.c.

References ALLOC_N, MEMCPY, rb_check_frozen(), rb_eTypeError, rb_obj_class(), rb_obj_is_instance_of(), rb_raise(), RSTRUCT, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_initialize VALUE  self,
VALUE  values
[static]
 

Definition at line 335 of file struct.c.

References FIX2LONG, MEMCPY, Qnil, RARRAY, rb_eArgError, rb_mem_clear(), rb_obj_class(), rb_raise(), rb_struct_iv_get(), rb_struct_modify(), RSTRUCT, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_inspect VALUE  s  )  [static]
 

Definition at line 516 of file struct.c.

References inspect_struct(), rb_class2name(), rb_inspecting_p(), rb_obj_class(), rb_protect_inspect(), rb_str_new(), RSTRING, snprintf(), and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_members VALUE  s  ) 
 

Definition at line 50 of file struct.c.

References RARRAY, rb_eTypeError, rb_obj_class(), rb_raise(), rb_struct_s_members(), RSTRUCT, and VALUE.

Referenced by inspect_struct(), rb_struct_aref_id(), rb_struct_aset_id(), rb_struct_each_pair(), rb_struct_getmember(), rb_struct_set(), and w_object().

VALUE rb_struct_members_m VALUE  obj  )  [static]
 

Definition at line 93 of file struct.c.

References rb_obj_class(), rb_struct_s_members_m(), and VALUE.

Referenced by Init_Struct().

void rb_struct_modify VALUE  s  )  [static]
 

Definition at line 150 of file struct.c.

References OBJ_FROZEN, OBJ_TAINTED, rb_error_frozen(), rb_eSecurityError, rb_raise(), rb_safe_level, and VALUE.

Referenced by rb_struct_aset(), rb_struct_aset_id(), rb_struct_initialize(), and rb_struct_set().

VALUE rb_struct_ref VALUE  obj  )  [static]
 

Definition at line 119 of file struct.c.

References FRAME::orig_func, rb_struct_getmember(), ruby_frame, and VALUE.

Referenced by make_struct().

VALUE rb_struct_ref0 VALUE  obj  )  [static]
 

Definition at line 125 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref1 VALUE  obj  )  [static]
 

Definition at line 126 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref2 VALUE  obj  )  [static]
 

Definition at line 127 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref3 VALUE  obj  )  [static]
 

Definition at line 128 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref4 VALUE  obj  )  [static]
 

Definition at line 129 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref5 VALUE  obj  )  [static]
 

Definition at line 130 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref6 VALUE  obj  )  [static]
 

Definition at line 131 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref7 VALUE  obj  )  [static]
 

Definition at line 132 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref8 VALUE  obj  )  [static]
 

Definition at line 133 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_ref9 VALUE  obj  )  [static]
 

Definition at line 134 of file struct.c.

References RSTRUCT, and VALUE.

VALUE rb_struct_s_def int  argc,
VALUE argv,
VALUE  klass
[static]
 

Definition at line 299 of file struct.c.

References ID, ID2SYM, make_struct(), name, NIL_P, Qnil, RARRAY, rb_ary_unshift(), rb_block_given_p(), rb_check_string_type(), rb_mod_module_eval(), rb_scan_args(), rb_to_id(), and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_s_members VALUE  klass  ) 
 

Definition at line 38 of file struct.c.

References NIL_P, rb_bug(), rb_struct_iv_get(), and VALUE.

Referenced by r_object0(), rb_struct_members(), and rb_struct_s_members_m().

VALUE rb_struct_s_members_m VALUE  klass  )  [static]
 

Definition at line 63 of file struct.c.

References RARRAY, rb_ary_new2(), rb_ary_push(), rb_id2name(), rb_str_new2(), rb_struct_s_members(), SYM2ID, and VALUE.

Referenced by make_struct(), and rb_struct_members_m().

VALUE rb_struct_select int  argc,
VALUE argv,
VALUE  s
[static]
 

Definition at line 750 of file struct.c.

References rb_ary_new(), rb_ary_push(), rb_eArgError, rb_raise(), rb_yield(), RSTRUCT, RTEST, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_set VALUE  obj,
VALUE  val
[static]
 

Definition at line 159 of file struct.c.

References ID, FRAME::last_func, FRAME::orig_func, Qnil, RARRAY, rb_id2name(), rb_id_attrset(), rb_name_error(), rb_struct_members(), rb_struct_modify(), RSTRUCT, ruby_frame, SYM2ID, and VALUE.

Referenced by make_struct().

VALUE rb_struct_size VALUE  s  )  [static]
 

Definition at line 870 of file struct.c.

References LONG2FIX, RSTRUCT, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_to_a VALUE  s  )  [static]
 

Definition at line 544 of file struct.c.

References rb_ary_new4(), RSTRUCT, and VALUE.

Referenced by Init_Struct().

VALUE rb_struct_values_at int  argc,
VALUE argv,
VALUE  s
[static]
 

Definition at line 721 of file struct.c.

References rb_values_at(), RSTRUCT, struct_entry(), and VALUE.

Referenced by Init_Struct().

VALUE struct_alloc VALUE   )  [static]
 

Definition at line 357 of file struct.c.

References ALLOC_N, FIX2LONG, NEWOBJ, OBJSETUP, rb_mem_clear(), rb_struct_iv_get(), T_STRUCT, and VALUE.

Referenced by make_struct().

VALUE struct_entry VALUE  ,
long 
[static]
 

Definition at line 697 of file struct.c.

References LONG2NUM, rb_struct_aref(), and VALUE.

Referenced by rb_struct_values_at().


Variable Documentation

VALUE rb_cStruct
 

Definition at line 16 of file struct.c.

VALUE(* ref_func[10])() = [static]
 

Definition at line 136 of file struct.c.

Referenced by make_struct().


Generated on Wed Jan 18 23:32:11 2006 for Ruby by doxygen 1.3.5