aboutsummaryrefslogtreecommitdiff
path: root/ruby/ext/google/protobuf_c/protobuf.c
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2016-08-25 13:15:28 -0700
committerJosh Haberman <jhaberman@gmail.com>2016-08-26 09:03:55 -0700
commitd4213d839f5dc29987f7aaaec595f435ea56db6a (patch)
tree230fdac61614940afa9d2ac3287c1117a40ab2e8 /ruby/ext/google/protobuf_c/protobuf.c
parent3d9d1a1255583bac550f7bf94f3016e8c238fa5e (diff)
downloadprotobuf-d4213d839f5dc29987f7aaaec595f435ea56db6a.tar.gz
protobuf-d4213d839f5dc29987f7aaaec595f435ea56db6a.tar.bz2
protobuf-d4213d839f5dc29987f7aaaec595f435ea56db6a.zip
Ruby: make sure map parsing frames are GC-rooted.
Diffstat (limited to 'ruby/ext/google/protobuf_c/protobuf.c')
-rw-r--r--ruby/ext/google/protobuf_c/protobuf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ruby/ext/google/protobuf_c/protobuf.c b/ruby/ext/google/protobuf_c/protobuf.c
index 7cde4aec..98963667 100644
--- a/ruby/ext/google/protobuf_c/protobuf.c
+++ b/ruby/ext/google/protobuf_c/protobuf.c
@@ -112,4 +112,6 @@ void Init_protobuf_c() {
upb_def_to_ruby_obj_map = rb_hash_new();
rb_gc_register_address(&upb_def_to_ruby_obj_map);
+ map_parse_frames = rb_ary_new();
+ rb_gc_register_address(&map_parse_frames);
}