Lines Matching defs:VALUE

15 VALUE rb_cStruct;
18 static VALUE struct_alloc(VALUE);
20 static inline VALUE
21 struct_ivar_get(VALUE c, ID id)
32 VALUE
33 rb_struct_iv_get(VALUE c, const char *name)
38 VALUE
39 rb_struct_s_members(VALUE klass)
41 VALUE members = struct_ivar_get(klass, id_members);
52 VALUE
53 rb_struct_members(VALUE s)
55 VALUE members = rb_struct_s_members(rb_obj_class(s));
64 static VALUE
65 rb_struct_s_members_m(VALUE klass)
67 VALUE members = rb_struct_s_members(klass);
84 static VALUE
85 rb_struct_members_m(VALUE obj)
90 VALUE
91 rb_struct_getmember(VALUE obj, ID id)
93 VALUE members, slot, *ptr, *ptr_members;
111 static VALUE
112 rb_struct_ref(VALUE obj)
117 static VALUE rb_struct_ref0(VALUE obj) {return RSTRUCT_PTR(obj)[0];}
118 static VALUE rb_struct_ref1(VALUE obj) {return RSTRUCT_PTR(obj)[1];}
119 static VALUE rb_struct_ref2(VALUE obj) {return RSTRUCT_PTR(obj)[2];}
120 static VALUE rb_struct_ref3(VALUE obj) {return RSTRUCT_PTR(obj)[3];}
121 static VALUE rb_struct_ref4(VALUE obj) {return RSTRUCT_PTR(obj)[4];}
122 static VALUE rb_struct_ref5(VALUE obj) {return RSTRUCT_PTR(obj)[5];}
123 static VALUE rb_struct_ref6(VALUE obj) {return RSTRUCT_PTR(obj)[6];}
124 static VALUE rb_struct_ref7(VALUE obj) {return RSTRUCT_PTR(obj)[7];}
125 static VALUE rb_struct_ref8(VALUE obj) {return RSTRUCT_PTR(obj)[8];}
126 static VALUE rb_struct_ref9(VALUE obj) {return RSTRUCT_PTR(obj)[9];}
131 static VALUE (*const ref_func[])(VALUE) = {
145 rb_struct_modify(VALUE s)
151 static VALUE
152 rb_struct_set(VALUE obj, VALUE val)
154 VALUE members, slot, *ptr, *ptr_members;
174 static VALUE
175 anonymous_struct(VALUE klass)
177 VALUE nstr;
185 static VALUE
186 new_struct(VALUE name, VALUE super)
203 static VALUE
204 setup_struct(VALUE nstr, VALUE members)
206 VALUE *ptr_members;
232 VALUE
233 rb_struct_alloc_noinit(VALUE klass)
238 VALUE
239 rb_struct_define_without_accessor(const char *class_name, VALUE super, rb_alloc_func_t alloc, ...)
241 VALUE klass;
243 VALUE members;
271 VALUE
275 VALUE st, ary;
337 static VALUE
338 rb_struct_s_def(int argc, VALUE *argv, VALUE klass)
340 VALUE name, rest;
342 VALUE st;
375 num_members(VALUE klass)
377 VALUE members;
388 static VALUE
389 rb_struct_initialize_m(int argc, VALUE *argv, VALUE self)
391 VALUE klass = rb_obj_class(self);
399 MEMCPY(RSTRUCT_PTR(self), argv, VALUE, argc);
406 VALUE
407 rb_struct_initialize(VALUE self, VALUE values)
412 static VALUE
413 struct_alloc(VALUE klass)
426 st->as.heap.ptr = ALLOC_N(VALUE, n);
431 return (VALUE)st;
434 VALUE
435 rb_struct_alloc(VALUE klass, VALUE values)
440 VALUE
441 rb_struct_new(VALUE klass, ...)
443 VALUE tmpargs[N_REF_FUNC], *mem = tmpargs;
454 mem[i] = va_arg(args, VALUE);
461 static VALUE
462 rb_struct_size(VALUE s);
485 static VALUE
486 rb_struct_each(VALUE s)
518 static VALUE
519 rb_struct_each_pair(VALUE s)
521 VALUE members;
527 VALUE key = rb_ary_entry(members, i);
528 VALUE value = RSTRUCT_PTR(s)[i];
534 static VALUE
535 inspect_struct(VALUE s, VALUE dummy, int recur)
537 VALUE cname = rb_class_name(rb_obj_class(s));
538 VALUE members, str = rb_str_new2("#<struct ");
539 VALUE *ptr, *ptr_members;
555 VALUE slot;
589 static VALUE
590 rb_struct_inspect(VALUE s)
607 static VALUE
608 rb_struct_to_a(VALUE s)
625 static VALUE
626 rb_struct_to_h(VALUE s)
628 VALUE h = rb_hash_new();
629 VALUE members = rb_struct_members(s);
639 VALUE
640 rb_struct_init_copy(VALUE copy, VALUE s)
646 MEMCPY(RSTRUCT_PTR(copy), RSTRUCT_PTR(s), VALUE, RSTRUCT_LEN(copy));
651 static VALUE
652 rb_struct_aref_id(VALUE s, ID id)
654 VALUE *ptr, members, *ptr_members;
690 VALUE
691 rb_struct_aref(VALUE s, VALUE idx)
718 static VALUE
719 rb_struct_aset_id(VALUE s, ID id, VALUE val)
721 VALUE members, *ptr, *ptr_members;
765 VALUE
766 rb_struct_aset(VALUE s, VALUE idx, VALUE val)
796 static VALUE
797 struct_entry(VALUE s, long n)
818 static VALUE
819 rb_struct_values_at(int argc, VALUE *argv, VALUE s)
839 static VALUE
840 rb_struct_select(int argc, VALUE *argv, VALUE s)
842 VALUE result;
857 static VALUE
858 recursive_equal(VALUE s, VALUE s2, int recur)
860 VALUE *ptr, *ptr2;
890 static VALUE
891 rb_struct_equal(VALUE s, VALUE s2)
903 static VALUE
904 recursive_hash(VALUE s, VALUE dummy, int recur)
908 VALUE n, *ptr;
930 static VALUE
931 rb_struct_hash(VALUE s)
936 static VALUE
937 recursive_eql(VALUE s, VALUE s2, int recur)
939 VALUE *ptr, *ptr2;
960 static VALUE
961 rb_struct_eql(VALUE s, VALUE s2)
985 static VALUE
986 rb_struct_size(VALUE s)