Lines Matching refs:VALUE

66 static VALUE table_key(Map* self, VALUE key,
103 static VALUE table_key_to_ruby(Map* self, upb_strview key) {
107 VALUE ret = rb_str_new(key.data, key.size);
140 VALUE cMap;
142 Map* ruby_to_Map(VALUE _self) {
174 VALUE Map_alloc(VALUE klass) {
181 VALUE Map_set_frame(VALUE map, VALUE val) {
227 VALUE Map_init(int argc, VALUE* argv, VALUE _self) {
285 VALUE Map_each(VALUE _self) {
292 VALUE key = table_key_to_ruby(self, upb_strtable_iter_key(&it));
296 VALUE value = native_slot_get(self->value_type,
312 VALUE Map_keys(VALUE _self) {
315 VALUE ret = rb_ary_new();
320 VALUE key = table_key_to_ruby(self, upb_strtable_iter_key(&it));
334 VALUE Map_values(VALUE _self) {
337 VALUE ret = rb_ary_new();
345 VALUE value = native_slot_get(self->value_type,
362 VALUE Map_index(VALUE _self, VALUE key) {
387 VALUE Map_index_set(VALUE _self, VALUE key, VALUE value) {
399 VALUE args[1] = { value };
423 VALUE Map_has_key(VALUE _self, VALUE key) {
445 VALUE Map_delete(VALUE _self, VALUE key) {
469 VALUE Map_clear(VALUE _self) {
489 VALUE Map_length(VALUE _self) {
494 VALUE Map_new_this_type(VALUE _self) {
496 VALUE new_map = Qnil;
497 VALUE key_type = fieldtype_to_ruby(self->key_type);
498 VALUE value_type = fieldtype_to_ruby(self->value_type);
516 VALUE Map_dup(VALUE _self) {
518 VALUE new_map = Map_new_this_type(_self);
541 VALUE Map_deep_copy(VALUE _self) {
543 VALUE new_map = Map_new_this_type(_self);
579 VALUE Map_eq(VALUE _self, VALUE _other) {
587 VALUE other_map = Map_new_this_type(_self);
638 VALUE Map_hash(VALUE _self) {
642 VALUE hash_sym = rb_intern("hash");
647 VALUE key = table_key_to_ruby(self, upb_strtable_iter_key(&it));
651 VALUE value = native_slot_get(self->value_type,
668 VALUE Map_to_h(VALUE _self) {
670 VALUE hash = rb_hash_new();
675 VALUE key = table_key_to_ruby(self, upb_strtable_iter_key(&it));
678 VALUE value = native_slot_get(self->value_type,
698 VALUE Map_inspect(VALUE _self) {
701 VALUE str = rb_str_new2("{");
704 VALUE inspect_sym = rb_intern("inspect");
709 VALUE key = table_key_to_ruby(self, upb_strtable_iter_key(&it));
713 VALUE value = native_slot_get(self->value_type,
740 VALUE Map_merge(VALUE _self, VALUE hashmap) {
741 VALUE dupped = Map_dup(_self);
745 static int merge_into_self_callback(VALUE key, VALUE value, VALUE self) {
751 VALUE Map_merge_into_self(VALUE _self, VALUE hashmap) {
787 void Map_begin(VALUE _self, Map_iter* iter) {
801 VALUE Map_iter_key(Map_iter* iter) {
805 VALUE Map_iter_value(Map_iter* iter) {
813 void Map_register(VALUE module) {
814 VALUE klass = rb_define_class_under(module, "Map", rb_cObject);