aboutsummaryrefslogtreecommitdiff
path: root/ruby/ext/google/protobuf_c/defs.c
diff options
context:
space:
mode:
authorChris Fallin <cfallin@c1f.net>2015-01-09 15:29:45 -0800
committerChris Fallin <cfallin@c1f.net>2015-01-09 15:37:55 -0800
commit4c92289766d76f276b322ab254ef039f670f41b1 (patch)
tree92d8ad529bc1d27139134befb506dfd5905a1dbf /ruby/ext/google/protobuf_c/defs.c
parent80276ac0218f6d8fcdbad0fb09b233b31d2bc0fb (diff)
downloadprotobuf-4c92289766d76f276b322ab254ef039f670f41b1.tar.gz
protobuf-4c92289766d76f276b322ab254ef039f670f41b1.tar.bz2
protobuf-4c92289766d76f276b322ab254ef039f670f41b1.zip
Addressed code-review comments.
Diffstat (limited to 'ruby/ext/google/protobuf_c/defs.c')
-rw-r--r--ruby/ext/google/protobuf_c/defs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ruby/ext/google/protobuf_c/defs.c b/ruby/ext/google/protobuf_c/defs.c
index 499e041b..a18aaac4 100644
--- a/ruby/ext/google/protobuf_c/defs.c
+++ b/ruby/ext/google/protobuf_c/defs.c
@@ -226,6 +226,7 @@ DEFINE_CLASS(Descriptor, "Google::Protobuf::Descriptor");
void Descriptor_mark(void* _self) {
Descriptor* self = _self;
rb_gc_mark(self->klass);
+ rb_gc_mark(self->typeclass_references);
}
void Descriptor_free(void* _self) {
@@ -270,6 +271,7 @@ VALUE Descriptor_alloc(VALUE klass) {
self->fill_method = NULL;
self->pb_serialize_handlers = NULL;
self->json_serialize_handlers = NULL;
+ self->typeclass_references = rb_ary_new();
return ret;
}