Переглянути джерело

Merge pull request #6758 from XrXr/ub

Remove unused argument to avoid UB
Joshua Haberman 6 роки тому
батько
коміт
77646a45e2

+ 1 - 1
ruby/ext/google/protobuf_c/defs.c

@@ -1232,7 +1232,7 @@ VALUE OneofDescriptor_name(VALUE _self) {
  *
  *
  * Iterates through fields in this oneof, yielding to the block on each one.
  * Iterates through fields in this oneof, yielding to the block on each one.
  */
  */
-VALUE OneofDescriptor_each(VALUE _self, VALUE field) {
+VALUE OneofDescriptor_each(VALUE _self) {
   DEFINE_SELF(OneofDescriptor, self, _self);
   DEFINE_SELF(OneofDescriptor, self, _self);
   upb_oneof_iter it;
   upb_oneof_iter it;
   for (upb_oneof_begin(&it, self->oneofdef);
   for (upb_oneof_begin(&it, self->oneofdef);

+ 1 - 1
ruby/ext/google/protobuf_c/protobuf.h

@@ -259,7 +259,7 @@ OneofDescriptor* ruby_to_OneofDescriptor(VALUE value);
 VALUE OneofDescriptor_initialize(VALUE _self, VALUE cookie,
 VALUE OneofDescriptor_initialize(VALUE _self, VALUE cookie,
                                  VALUE descriptor_pool, VALUE ptr);
                                  VALUE descriptor_pool, VALUE ptr);
 VALUE OneofDescriptor_name(VALUE _self);
 VALUE OneofDescriptor_name(VALUE _self);
-VALUE OneofDescriptor_each(VALUE _self, VALUE field);
+VALUE OneofDescriptor_each(VALUE _self);
 
 
 void EnumDescriptor_mark(void* _self);
 void EnumDescriptor_mark(void* _self);
 void EnumDescriptor_free(void* _self);
 void EnumDescriptor_free(void* _self);