Sha256: d6df1d116a1e3bac8f99bde757ef1d716556f7672e6484d22c6aae67e1909afe

Contents?: true

Size: 1.74 KB

Versions: 172

Compression:

Stored size: 1.74 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 frozen sentinel Ruby wrapper object for an empty upb_Array of the
// type specified by the field. Creates one if it doesn't exist.
VALUE RepeatedField_EmptyFrozen(const upb_FieldDef* f);

// Returns a Ruby wrapper object for the given upb_Array, which will be created
// if one does not exist already.
VALUE RepeatedField_GetRubyWrapper(const 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_freeze(VALUE _self);

#endif  // RUBY_PROTOBUF_REPEATED_FIELD_H_

Version data entries

172 entries across 172 versions & 2 rubygems

Version Path
google-protobuf-4.29.4 ext/google/protobuf_c/repeated_field.h
google-protobuf-4.29.4-x86_64-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-4.29.4-x86_64-darwin ext/google/protobuf_c/repeated_field.h
google-protobuf-4.29.4-x86-mingw32 ext/google/protobuf_c/repeated_field.h
google-protobuf-4.29.4-x86-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-4.29.4-x64-mingw32 ext/google/protobuf_c/repeated_field.h
google-protobuf-4.29.4-x64-mingw-ucrt ext/google/protobuf_c/repeated_field.h
google-protobuf-4.29.4-arm64-darwin ext/google/protobuf_c/repeated_field.h
google-protobuf-4.29.4-aarch64-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1 ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1-x86_64-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1-x86_64-darwin ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1-x86-mingw32 ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1-x86-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1-x64-mingw32 ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1-x64-mingw-ucrt ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1-arm64-darwin ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.1-aarch64-linux ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.0 ext/google/protobuf_c/repeated_field.h
google-protobuf-4.30.0-x86_64-linux ext/google/protobuf_c/repeated_field.h