diff options
author | Chris Fallin <cfallin@google.com> | 2015-02-13 14:32:09 -0800 |
---|---|---|
committer | Chris Fallin <cfallin@google.com> | 2015-02-13 14:32:09 -0800 |
commit | 315b93fdccd329a8492e6df8e06c7c305a678a5e (patch) | |
tree | 0f706cb73b726b52a8a65b5f5d0d2230c34eea60 | |
parent | a2bea0a0012b4adbc50c47246d968a85cb88cec2 (diff) | |
download | protobuf-315b93fdccd329a8492e6df8e06c7c305a678a5e.tar.gz protobuf-315b93fdccd329a8492e6df8e06c7c305a678a5e.tar.bz2 protobuf-315b93fdccd329a8492e6df8e06c7c305a678a5e.zip |
Addressed code-review comment.
-rw-r--r-- | ruby/ext/google/protobuf_c/encode_decode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ruby/ext/google/protobuf_c/encode_decode.c b/ruby/ext/google/protobuf_c/encode_decode.c index 256fc829..5730504d 100644 --- a/ruby/ext/google/protobuf_c/encode_decode.c +++ b/ruby/ext/google/protobuf_c/encode_decode.c @@ -208,6 +208,10 @@ typedef struct { size_t ofs; upb_fieldtype_t key_field_type; upb_fieldtype_t value_field_type; + + // We know that we can hold this reference because the handlerdata has the + // same lifetime as the upb_handlers struct, and the upb_handlers struct holds + // a reference to the upb_msgdef, which in turn has references to its subdefs. const upb_def* value_field_subdef; } map_handlerdata_t; |