aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/ext/google/protobuf_c/repeated_field.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/ext/google/protobuf_c/repeated_field.c')
-rw-r--r--ruby/ext/google/protobuf_c/repeated_field.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ruby/ext/google/protobuf_c/repeated_field.c b/ruby/ext/google/protobuf_c/repeated_field.c
index 72687f27..83afbc91 100644
--- a/ruby/ext/google/protobuf_c/repeated_field.c
+++ b/ruby/ext/google/protobuf_c/repeated_field.c
@@ -606,13 +606,12 @@ void RepeatedField_free(void* _self) {
*/
VALUE RepeatedField_alloc(VALUE klass) {
RepeatedField* self = ALLOC(RepeatedField);
- VALUE ret = TypedData_Wrap_Struct(klass, &RepeatedField_type, self);
self->elements = NULL;
self->size = 0;
self->capacity = 0;
self->field_type = -1;
self->field_type_class = Qnil;
- return ret;
+ return TypedData_Wrap_Struct(klass, &RepeatedField_type, self);
}
VALUE RepeatedField_init(int argc, VALUE* argv, VALUE self) {