google-protobuf 4.31.1-x86_64-linux-musl → 4.32.0.rc.1-x86_64-linux-musl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -192,13 +192,20 @@ static VALUE RepeatedField_subarray(RepeatedField* self, long beg, long len) {
192
192
  return ary;
193
193
  }
194
194
 
195
+ /**
196
+ * ruby-doc: RepeatedField
197
+ *
198
+ */
199
+
195
200
  /*
196
- * call-seq:
197
- * RepeatedField.each(&block)
201
+ * ruby-doc: RepeatedField#each
198
202
  *
199
203
  * Invokes the block once for each element of the repeated field. RepeatedField
200
204
  * also includes Enumerable; combined with this method, the repeated field thus
201
205
  * acts like an ordinary Ruby sequence.
206
+ *
207
+ * @yield [Object]
208
+ * @return [self]
202
209
  */
203
210
  static VALUE RepeatedField_each(VALUE _self) {
204
211
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -214,10 +221,12 @@ static VALUE RepeatedField_each(VALUE _self) {
214
221
  }
215
222
 
216
223
  /*
217
- * call-seq:
218
- * RepeatedField.[](index) => value
224
+ * ruby-doc: RepeatedField#[]
219
225
  *
220
226
  * Accesses the element at the given index. Returns nil on out-of-bounds
227
+ *
228
+ * @param index [Integer]
229
+ * @return [Object,nil]
221
230
  */
222
231
  static VALUE RepeatedField_index(int argc, VALUE* argv, VALUE _self) {
223
232
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -262,11 +271,14 @@ static VALUE RepeatedField_index(int argc, VALUE* argv, VALUE _self) {
262
271
  }
263
272
 
264
273
  /*
265
- * call-seq:
266
- * RepeatedField.[]=(index, value)
274
+ * ruby-doc: RepeatedField#[]=
267
275
  *
268
276
  * Sets the element at the given index. On out-of-bounds assignments, extends
269
277
  * the array and fills the hole (if any) with default values.
278
+ *
279
+ * @param index [Integer]
280
+ * @param value [Object
281
+ * @return [nil]
270
282
  */
271
283
  static VALUE RepeatedField_index_set(VALUE _self, VALUE _index, VALUE val) {
272
284
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -296,10 +308,12 @@ static VALUE RepeatedField_index_set(VALUE _self, VALUE _index, VALUE val) {
296
308
  }
297
309
 
298
310
  /*
299
- * call-seq:
300
- * RepeatedField.push(value, ...)
311
+ * ruby-doc: RepeatedField#push
301
312
  *
302
313
  * Adds a new element to the repeated field.
314
+ *
315
+ * @param value [Object]
316
+ * @return [self]
303
317
  */
304
318
  static VALUE RepeatedField_push_vararg(int argc, VALUE* argv, VALUE _self) {
305
319
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -317,10 +331,12 @@ static VALUE RepeatedField_push_vararg(int argc, VALUE* argv, VALUE _self) {
317
331
  }
318
332
 
319
333
  /*
320
- * call-seq:
321
- * RepeatedField.<<(value)
334
+ * ruby-doc: RepeatedField#<<
322
335
  *
323
336
  * Adds a new element to the repeated field.
337
+ *
338
+ * @param value [Object]
339
+ * @return [self]
324
340
  */
325
341
  static VALUE RepeatedField_push(VALUE _self, VALUE val) {
326
342
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -355,10 +371,12 @@ static VALUE RepeatedField_pop_one(VALUE _self) {
355
371
  }
356
372
 
357
373
  /*
358
- * call-seq:
359
- * RepeatedField.replace(list)
374
+ * ruby-doc: RepeatedField#replace
360
375
  *
361
376
  * Replaces the contents of the repeated field with the given list of elements.
377
+ *
378
+ * @param list [Array]
379
+ * @return [Array]
362
380
  */
363
381
  static VALUE RepeatedField_replace(VALUE _self, VALUE list) {
364
382
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -376,10 +394,11 @@ static VALUE RepeatedField_replace(VALUE _self, VALUE list) {
376
394
  }
377
395
 
378
396
  /*
379
- * call-seq:
380
- * RepeatedField.clear
397
+ * ruby-doc: RepeatedField#clear
381
398
  *
382
399
  * Clears (removes all elements from) this repeated field.
400
+ *
401
+ * @return [self]
383
402
  */
384
403
  static VALUE RepeatedField_clear(VALUE _self) {
385
404
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -389,10 +408,11 @@ static VALUE RepeatedField_clear(VALUE _self) {
389
408
  }
390
409
 
391
410
  /*
392
- * call-seq:
393
- * RepeatedField.length
411
+ * ruby-doc: RepeatedField#length
394
412
  *
395
413
  * Returns the length of this repeated field.
414
+ *
415
+ * @return [Integer]
396
416
  */
397
417
  static VALUE RepeatedField_length(VALUE _self) {
398
418
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -400,11 +420,12 @@ static VALUE RepeatedField_length(VALUE _self) {
400
420
  }
401
421
 
402
422
  /*
403
- * call-seq:
404
- * RepeatedField.dup => repeated_field
423
+ * ruby-doc: RepeatedField#dup
405
424
  *
406
425
  * Duplicates this repeated field with a shallow copy. References to all
407
426
  * non-primitive element objects (e.g., submessages) are shared.
427
+ *
428
+ * @return [RepeatedField]
408
429
  */
409
430
  static VALUE RepeatedField_dup(VALUE _self) {
410
431
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -426,11 +447,12 @@ static VALUE RepeatedField_dup(VALUE _self) {
426
447
  }
427
448
 
428
449
  /*
429
- * call-seq:
430
- * RepeatedField.to_ary => array
450
+ * ruby-doc: RepeatedField#to_ary
431
451
  *
432
452
  * Used when converted implicitly into array, e.g. compared to an Array.
433
453
  * Also called as a fallback of Object#to_a
454
+ *
455
+ * @return [Array]
434
456
  */
435
457
  VALUE RepeatedField_to_ary(VALUE _self) {
436
458
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -448,8 +470,7 @@ VALUE RepeatedField_to_ary(VALUE _self) {
448
470
  }
449
471
 
450
472
  /*
451
- * call-seq:
452
- * RepeatedField.==(other) => boolean
473
+ * ruby-doc: RepeatedField#==
453
474
  *
454
475
  * Compares this repeated field to another. Repeated fields are equal if their
455
476
  * element types are equal, their lengths are equal, and each element is equal.
@@ -459,6 +480,9 @@ VALUE RepeatedField_to_ary(VALUE _self) {
459
480
  * Repeated fields with dissimilar element types are never equal, even if value
460
481
  * comparison (for example, between integers and floats) would have otherwise
461
482
  * indicated that every element has equal value.
483
+ *
484
+ * @param other [RepeatedField]
485
+ * @return [Boolean]
462
486
  */
463
487
  VALUE RepeatedField_eq(VALUE _self, VALUE _other) {
464
488
  RepeatedField* self;
@@ -495,12 +519,13 @@ VALUE RepeatedField_eq(VALUE _self, VALUE _other) {
495
519
  }
496
520
 
497
521
  /*
498
- * call-seq:
499
- * RepeatedField.frozen? => bool
522
+ * ruby-doc: RepeatedField#frozen?
500
523
  *
501
524
  * Returns true if the repeated field is frozen in either Ruby or the underlying
502
525
  * representation. Freezes the Ruby repeated field object if it is not already
503
526
  * frozen in Ruby but it is frozen in the underlying representation.
527
+ *
528
+ * @return [Boolean]
504
529
  */
505
530
  VALUE RepeatedField_frozen(VALUE _self) {
506
531
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -515,11 +540,12 @@ VALUE RepeatedField_frozen(VALUE _self) {
515
540
  }
516
541
 
517
542
  /*
518
- * call-seq:
519
- * RepeatedField.freeze => self
543
+ * ruby-doc: RepeatedField#freeze
520
544
  *
521
545
  * Freezes the repeated field object. We have to intercept this so we can freeze
522
546
  * the underlying representation, not just the Ruby wrapper.
547
+ *
548
+ * @return [self]
523
549
  */
524
550
  VALUE RepeatedField_freeze(VALUE _self) {
525
551
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -541,10 +567,11 @@ VALUE RepeatedField_freeze(VALUE _self) {
541
567
  }
542
568
 
543
569
  /*
544
- * call-seq:
545
- * RepeatedField.hash => hash_value
570
+ * ruby-doc: RepeatedField#hash
546
571
  *
547
572
  * Returns a hash value computed from this repeated field's elements.
573
+ *
574
+ * @return [Integer]
548
575
  */
549
576
  VALUE RepeatedField_hash(VALUE _self) {
550
577
  RepeatedField* self = ruby_to_RepeatedField(_self);
@@ -560,12 +587,14 @@ VALUE RepeatedField_hash(VALUE _self) {
560
587
  }
561
588
 
562
589
  /*
563
- * call-seq:
564
- * RepeatedField.+(other) => repeated field
590
+ * ruby-doc: RepeatedField#+
565
591
  *
566
592
  * Returns a new repeated field that contains the concatenated list of this
567
593
  * repeated field's elements and other's elements. The other (second) list may
568
594
  * be either another repeated field or a Ruby array.
595
+ *
596
+ * @param other [Array,RepeatedField]
597
+ * @return [RepeatedField]
569
598
  */
570
599
  VALUE RepeatedField_plus(VALUE _self, VALUE list) {
571
600
  VALUE dupped_ = RepeatedField_dup(_self);
@@ -605,10 +634,12 @@ VALUE RepeatedField_plus(VALUE _self, VALUE list) {
605
634
  }
606
635
 
607
636
  /*
608
- * call-seq:
609
- * RepeatedField.concat(other) => self
637
+ * ruby-doc: RepeatedField#concat
610
638
  *
611
639
  * concats the passed in array to self. Returns a Ruby array.
640
+ *
641
+ * @param other [RepeatedField]
642
+ * @return [Array]
612
643
  */
613
644
  VALUE RepeatedField_concat(VALUE _self, VALUE list) {
614
645
  int i;
@@ -621,15 +652,21 @@ VALUE RepeatedField_concat(VALUE _self, VALUE list) {
621
652
  }
622
653
 
623
654
  /*
624
- * call-seq:
625
- * RepeatedField.new(type, type_class = nil, initial_elems = [])
655
+ * ruby-doc: RepeatedField#initialize
626
656
  *
627
657
  * Creates a new repeated field. The provided type must be a Ruby symbol, and
628
- * can take on the same values as those accepted by FieldDescriptor#type=. If
658
+ * can take on the same values as those accepted by {FieldDescriptor#type=}. If
629
659
  * the type is :message or :enum, type_class must be non-nil, and must be the
630
- * Ruby class or module returned by Descriptor#msgclass or
631
- * EnumDescriptor#enummodule, respectively. An initial list of elements may also
632
- * be provided.
660
+ * Ruby class or module returned by {Descriptor#msgclass} or
661
+ * {EnumDescriptor#enummodule}, respectively. An initial list of elements may
662
+ * also be provided.
663
+ *
664
+ * @param type [Symbol]
665
+ * @param type_class [Class<AbstractMessage>, Module]
666
+ * @paramdefault type_class nil
667
+ * @param initial_elems [Array]
668
+ * @paramdefault initial_elems []
669
+ * @return [RepeatedField]
633
670
  */
634
671
  VALUE RepeatedField_init(int argc, VALUE* argv, VALUE _self) {
635
672
  RepeatedField* self = ruby_to_RepeatedField(_self);