diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-08-20 16:41:32 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-08-20 16:41:32 -0700 |
commit | d61e6adfcc82d4a1b3b3882f07b39c77b42eafc1 (patch) | |
tree | c50b55ab6b20f4b63f69b94eb2276fc6d4333983 /ruby/ext/google/protobuf_c/map.c | |
parent | a1daeaba80570a673913f8184855219607a6f556 (diff) | |
download | protobuf-d61e6adfcc82d4a1b3b3882f07b39c77b42eafc1.tar.gz protobuf-d61e6adfcc82d4a1b3b3882f07b39c77b42eafc1.tar.bz2 protobuf-d61e6adfcc82d4a1b3b3882f07b39c77b42eafc1.zip |
Return TypedData_Wrap_Struct directly.
Change-Id: I6cf77f01370204ad4bc7b345a040a9a3de1706a0
Diffstat (limited to 'ruby/ext/google/protobuf_c/map.c')
-rw-r--r-- | ruby/ext/google/protobuf_c/map.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ruby/ext/google/protobuf_c/map.c b/ruby/ext/google/protobuf_c/map.c index 5043f395..92fc7286 100644 --- a/ruby/ext/google/protobuf_c/map.c +++ b/ruby/ext/google/protobuf_c/map.c @@ -167,10 +167,9 @@ void Map_free(void* _self) { VALUE Map_alloc(VALUE klass) { Map* self = ALLOC(Map); - VALUE ret = TypedData_Wrap_Struct(klass, &Map_type, self); memset(self, 0, sizeof(Map)); self->value_type_class = Qnil; - return ret; + return TypedData_Wrap_Struct(klass, &Map_type, self); } static bool needs_typeclass(upb_fieldtype_t type) { |