diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2017-08-30 11:16:57 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2017-08-30 11:38:09 -0700 |
commit | f55c6ec24f8ac51c80d40f06732537a2d2aa3ab1 (patch) | |
tree | 2c4ac5adc8fa043b6838d36c01f0eb3cf05232cb /ruby/ext/google/protobuf_c/encode_decode.c | |
parent | d6152dd51c833bae79208ee8c03bd6a1d21fe632 (diff) | |
download | protobuf-f55c6ec24f8ac51c80d40f06732537a2d2aa3ab1.tar.gz protobuf-f55c6ec24f8ac51c80d40f06732537a2d2aa3ab1.tar.bz2 protobuf-f55c6ec24f8ac51c80d40f06732537a2d2aa3ab1.zip |
Storing the frame on the map means we don't need the array
Diffstat (limited to 'ruby/ext/google/protobuf_c/encode_decode.c')
-rw-r--r-- | ruby/ext/google/protobuf_c/encode_decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby/ext/google/protobuf_c/encode_decode.c b/ruby/ext/google/protobuf_c/encode_decode.c index 1427f4b8..edbbe6a5 100644 --- a/ruby/ext/google/protobuf_c/encode_decode.c +++ b/ruby/ext/google/protobuf_c/encode_decode.c @@ -288,7 +288,7 @@ static map_parse_frame_t* map_push_frame(VALUE map, native_slot_init(handlerdata->key_field_type, &frame->key_storage); native_slot_init(handlerdata->value_field_type, &frame->value_storage); - Map_push_frame(map, + Map_set_frame(map, TypedData_Wrap_Struct(rb_cObject, &MapParseFrame_type, frame)); return frame; @@ -327,7 +327,7 @@ static bool endmap_handler(void *closure, const void *hd, upb_status* s) { &frame->value_storage); Map_index_set(frame->map, key, value); - Map_pop_frame(frame->map); + Map_set_frame(frame->map, Qnil); return true; } |