Sha256: 27deef8a09fcda0f90e2d82065fd015553d45b846d5a00a1838773ffcbeb0f05

Contents?: true

Size: 1.53 KB

Versions: 45

Compression:

Stored size: 1.53 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_MAP_H_
#define RUBY_PROTOBUF_MAP_H_

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

// Returns a Ruby wrapper object for the given map, which will be created if
// one does not exist already.
VALUE Map_GetRubyWrapper(upb_Map *map, upb_CType key_type, TypeInfo value_type,
                         VALUE arena);

// Gets the underlying upb_Map for this Ruby map object, which must have
// key/value type that match |field|. If this is not a map or the type doesn't
// match, raises an exception.
const upb_Map *Map_GetUpbMap(VALUE val, const upb_FieldDef *field,
                             upb_Arena *arena);

// Implements #inspect for this map by appending its contents to |b|.
void Map_Inspect(StringBuilder *b, const upb_Map *map, upb_CType key_type,
                 TypeInfo val_type);

// Returns a new Hash object containing the contents of this Map.
VALUE Map_CreateHash(const upb_Map *map, upb_CType key_type, TypeInfo val_info);

// Returns a deep copy of this Map object.
VALUE Map_deep_copy(VALUE obj);

// Ruby class of Google::Protobuf::Map.
extern VALUE cMap;

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

// Recursively freeze map
VALUE Map_internal_deep_freeze(VALUE _self);

#endif  // RUBY_PROTOBUF_MAP_H_

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
google-protobuf-3.25.3-x86_64-darwin ext/google/protobuf_c/map.h
google-protobuf-3.25.3-x86-mingw32 ext/google/protobuf_c/map.h
google-protobuf-3.25.3-x86-linux ext/google/protobuf_c/map.h
google-protobuf-3.25.3-x64-mingw32 ext/google/protobuf_c/map.h
google-protobuf-3.25.3-x64-mingw-ucrt ext/google/protobuf_c/map.h
google-protobuf-3.25.3-arm64-darwin ext/google/protobuf_c/map.h
google-protobuf-3.25.3-aarch64-linux ext/google/protobuf_c/map.h
google-protobuf-3.25.2 ext/google/protobuf_c/map.h
google-protobuf-3.25.2-x86_64-linux ext/google/protobuf_c/map.h
google-protobuf-3.25.2-x86_64-darwin ext/google/protobuf_c/map.h
google-protobuf-3.25.2-x86-mingw32 ext/google/protobuf_c/map.h
google-protobuf-3.25.2-x86-linux ext/google/protobuf_c/map.h
google-protobuf-3.25.2-x64-mingw32 ext/google/protobuf_c/map.h
google-protobuf-3.25.2-x64-mingw-ucrt ext/google/protobuf_c/map.h
google-protobuf-3.25.2-arm64-darwin ext/google/protobuf_c/map.h
google-protobuf-3.25.2-aarch64-linux ext/google/protobuf_c/map.h
google-protobuf-3.25.1 ext/google/protobuf_c/map.h
google-protobuf-3.25.1-x86_64-linux ext/google/protobuf_c/map.h
google-protobuf-3.25.1-x86_64-darwin ext/google/protobuf_c/map.h
google-protobuf-3.25.1-x86-mingw32 ext/google/protobuf_c/map.h