Sha256: 821903d2f37f4b34079474b08922d850f65591404536de104b9e0cbc9a1615d9

Contents?: true

Size: 1.55 KB

Versions: 45

Compression:

Stored size: 1.55 KB

Contents

// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.  All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

#ifndef RUBY_PROTOBUF_REPEATED_FIELD_H_
#define RUBY_PROTOBUF_REPEATED_FIELD_H_

#include "protobuf.h"
#include "ruby-upb.h"

// Returns a Ruby wrapper object for the given upb_Array, which will be created
// if one does not exist already.
VALUE RepeatedField_GetRubyWrapper(upb_Array* msg, TypeInfo type_info,
                                   VALUE arena);

// Gets the underlying upb_Array for this Ruby RepeatedField object, which must
// have a type that matches |f|. If this is not a repeated field or the type
// doesn't match, raises an exception.
const upb_Array* RepeatedField_GetUpbArray(VALUE value, const upb_FieldDef* f,
                                           upb_Arena* arena);

// Implements #inspect for this repeated field by appending its contents to |b|.
void RepeatedField_Inspect(StringBuilder* b, const upb_Array* array,
                           TypeInfo info);

// Returns a deep copy of this RepeatedField object.
VALUE RepeatedField_deep_copy(VALUE obj);

// Ruby class of Google::Protobuf::RepeatedField.
extern VALUE cRepeatedField;

// Call at startup to register all types in this module.
void RepeatedField_register(VALUE module);

// Recursively freeze RepeatedField.
VALUE RepeatedField_internal_deep_freeze(VALUE _self);

#endif  // RUBY_PROTOBUF_REPEATED_FIELD_H_

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
google-protobuf-3.25.5 ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.5-x86_64-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.5-x86_64-darwin ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.5-x86-mingw32 ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.5-x86-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.5-x64-mingw32 ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.5-x64-mingw-ucrt ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.5-arm64-darwin ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.5-aarch64-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4 ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4-x86_64-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4-x86_64-darwin ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4-x86-mingw32 ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4-x86-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4-x64-mingw32 ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4-x64-mingw-ucrt ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4-arm64-darwin ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.4-aarch64-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.3 ext/google/protobuf_c/repeated_field.h
google-protobuf-3.25.3-x86_64-linux ext/google/protobuf_c/repeated_field.h