Home | History | Annotate | Download | only in protobuf_c

Lines Matching defs:memory

41 #define DEREF(memory, type) *(type*)(memory)
111 void* memory, VALUE value) {
112 native_slot_set_value_and_case(type, type_class, memory, value, NULL, 0);
116 void* memory, VALUE value,
119 // Note that in order to atomically change the value in memory and the case
120 // value (w.r.t. Ruby VM calls), we must set the value at |memory| only after
128 DEREF(memory, float) = NUM2DBL(value);
134 DEREF(memory, double) = NUM2DBL(value);
145 DEREF(memory, int8_t) = val;
154 DEREF(memory, VALUE) = value;
165 DEREF(memory, VALUE) = value;
186 DEREF(memory, int32_t) = int_val;
196 DEREF(memory, int32_t) = NUM2INT(value);
199 DEREF(memory, int64_t) = NUM2LL(value);
202 DEREF(memory, uint32_t) = NUM2UINT(value);
205 DEREF(memory, uint64_t) = NUM2ULL(value);
222 const void* memory) {
225 return DBL2NUM(DEREF(memory, float));
227 return DBL2NUM(DEREF(memory, double));
229 return DEREF(memory, int8_t) ? Qtrue : Qfalse;
233 return DEREF(memory, VALUE);
235 int32_t val = DEREF(memory, int32_t);
244 return INT2NUM(DEREF(memory, int32_t));
246 return LL2NUM(DEREF(memory, int64_t));
248 return UINT2NUM(DEREF(memory, uint32_t));
250 return ULL2NUM(DEREF(memory, uint64_t));
256 void native_slot_init(upb_fieldtype_t type, void* memory) {
259 DEREF(memory, float) = 0.0;
262 DEREF(memory, double) = 0.0;
265 DEREF(memory, int8_t) = 0;
269 DEREF(memory, VALUE) = rb_str_new2("");
270 rb_enc_associate(DEREF(memory, VALUE), (type == UPB_TYPE_BYTES) ?
274 DEREF(memory, VALUE) = Qnil;
278 DEREF(memory, int32_t) = 0;
281 DEREF(memory, int64_t) = 0;
284 DEREF(memory, uint32_t) = 0;
287 DEREF(memory, uint64_t) = 0;
294 void native_slot_mark(upb_fieldtype_t type, void* memory) {
299 rb_gc_mark(DEREF(memory, VALUE));
392 // Memory layout management.
535 void* memory = slot_memory(layout, storage, field);
544 memory);
546 return *((VALUE *)memory);
550 memory);
610 void* memory = slot_memory(layout, storage, field);
617 memset(memory, 0, NATIVE_SLOT_MAX_SIZE);
633 memory, val,
638 DEREF(memory, VALUE) = val;
641 DEREF(memory, VALUE) = val;
644 memory, val);
655 void* memory = slot_memory(layout, storage, field);
659 memset(memory, 0, NATIVE_SLOT_MAX_SIZE);
683 DEREF(memory, VALUE) = map;
700 DEREF(memory, VALUE) = ary;
702 native_slot_init(upb_fielddef_type(field), memory);
713 void* memory = slot_memory(layout, storage, field);
718 native_slot_mark(upb_fielddef_type(field), memory);
721 rb_gc_mark(DEREF(memory, VALUE));
723 native_slot_mark(upb_fielddef_type(field), memory);