Classes | Macros | Typedefs | Functions | Variables
protobuf/ruby/ext/google/protobuf_c/protobuf.c File Reference
#include "protobuf.h"
#include <ruby/version.h>
#include "defs.h"
#include "map.h"
#include "message.h"
#include "repeated_field.h"
Include dependency graph for protobuf/ruby/ext/google/protobuf_c/protobuf.c:

Go to the source code of this file.

Classes

struct  Arena
 
struct  StringBuilder
 

Macros

#define USE_SECONDARY_MAP   1
 

Typedefs

typedef struct StringBuilder StringBuilder
 

Functions

 __attribute__ ((visibility("default")))
 
static VALUE Arena_alloc (VALUE klass)
 
static void Arena_free (void *data)
 
void Arena_fuse (VALUE _arena, upb_arena *other)
 
upb_arenaArena_get (VALUE _arena)
 
static void Arena_mark (void *data)
 
VALUE Arena_new ()
 
void Arena_Pin (VALUE _arena, VALUE obj)
 
void Arena_register (VALUE module)
 
VALUE Google_Protobuf_deep_copy (VALUE self, VALUE obj)
 
static VALUE Google_Protobuf_discard_unknown (VALUE self, VALUE msg_rb)
 
const upb_fielddefmap_field_key (const upb_fielddef *field)
 
const upb_fielddefmap_field_value (const upb_fielddef *field)
 
void ObjectCache_Add (const void *key, VALUE val)
 
VALUE ObjectCache_Get (const void *key)
 
static VALUE ObjectCache_GetKey (const void *key, bool create)
 
static void ObjectCache_Init ()
 
static VALUE SecondaryMap_Get (VALUE key, bool create)
 
static void SecondaryMap_Init ()
 
static void SecondaryMap_MaybeGC ()
 
void StringBuilder_Free (StringBuilder *b)
 
StringBuilderStringBuilder_New ()
 
static void StringBuilder_PrintEnum (StringBuilder *b, int32_t val, const upb_enumdef *e)
 
void StringBuilder_Printf (StringBuilder *b, const char *fmt,...)
 
void StringBuilder_PrintMsgval (StringBuilder *b, upb_msgval val, TypeInfo info)
 
static size_t StringBuilder_SizeOf (size_t cap)
 
VALUE StringBuilder_ToRubyString (StringBuilder *b)
 

Variables

const rb_data_type_t Arena_type
 
static VALUE cArena
 
VALUE cParseError
 
VALUE cTypeError
 
VALUE gc_secondary_map_lambda = Qnil
 
ID item_get
 
ID item_set
 
ID length
 
VALUE secondary_map = Qnil
 
VALUE secondary_map_mutex = Qnil
 
VALUE weak_obj_cache = Qnil
 

Macro Definition Documentation

◆ USE_SECONDARY_MAP

#define USE_SECONDARY_MAP   1

Typedef Documentation

◆ StringBuilder

typedef struct StringBuilder StringBuilder

Function Documentation

◆ __attribute__()

__attribute__ ( (visibility("default"))  )

◆ Arena_alloc()

static VALUE Arena_alloc ( VALUE  klass)
static

◆ Arena_free()

static void Arena_free ( void *  data)
static

◆ Arena_fuse()

void Arena_fuse ( VALUE  _arena,
upb_arena other 
)

◆ Arena_get()

upb_arena* Arena_get ( VALUE  _arena)

◆ Arena_mark()

static void Arena_mark ( void *  data)
static

◆ Arena_new()

VALUE Arena_new ( )

◆ Arena_Pin()

void Arena_Pin ( VALUE  _arena,
VALUE  obj 
)

◆ Arena_register()

void Arena_register ( VALUE  module)

◆ Google_Protobuf_deep_copy()

VALUE Google_Protobuf_deep_copy ( VALUE  self,
VALUE  obj 
)

◆ Google_Protobuf_discard_unknown()

static VALUE Google_Protobuf_discard_unknown ( VALUE  self,
VALUE  msg_rb 
)
static

◆ map_field_key()

const upb_fielddef* map_field_key ( const upb_fielddef field)

◆ map_field_value()

const upb_fielddef* map_field_value ( const upb_fielddef field)

◆ ObjectCache_Add()

void ObjectCache_Add ( const void *  key,
VALUE  val 
)

◆ ObjectCache_Get()

VALUE ObjectCache_Get ( const void *  key)

◆ ObjectCache_GetKey()

static VALUE ObjectCache_GetKey ( const void *  key,
bool  create 
)
static

◆ ObjectCache_Init()

static void ObjectCache_Init ( )
static

◆ SecondaryMap_Get()

static VALUE SecondaryMap_Get ( VALUE  key,
bool  create 
)
static

◆ SecondaryMap_Init()

static void SecondaryMap_Init ( )
static

◆ SecondaryMap_MaybeGC()

static void SecondaryMap_MaybeGC ( )
static

◆ StringBuilder_Free()

void StringBuilder_Free ( StringBuilder b)

◆ StringBuilder_New()

StringBuilder* StringBuilder_New ( )

◆ StringBuilder_PrintEnum()

static void StringBuilder_PrintEnum ( StringBuilder b,
int32_t  val,
const upb_enumdef e 
)
static

◆ StringBuilder_Printf()

void StringBuilder_Printf ( StringBuilder b,
const char *  fmt,
  ... 
)

◆ StringBuilder_PrintMsgval()

void StringBuilder_PrintMsgval ( StringBuilder b,
upb_msgval  val,
TypeInfo  info 
)

◆ StringBuilder_SizeOf()

static size_t StringBuilder_SizeOf ( size_t  cap)
static

◆ StringBuilder_ToRubyString()

VALUE StringBuilder_ToRubyString ( StringBuilder b)

Variable Documentation

◆ Arena_type

const rb_data_type_t Arena_type
Initial value:
= {
"Google::Protobuf::Internal::Arena",
{ Arena_mark, Arena_free, NULL },
.flags = RUBY_TYPED_FREE_IMMEDIATELY,
}

Definition at line 188 of file protobuf/ruby/ext/google/protobuf_c/protobuf.c.

◆ cArena

VALUE cArena
static

◆ cParseError

VALUE cParseError

◆ cTypeError

VALUE cTypeError

◆ gc_secondary_map_lambda

VALUE gc_secondary_map_lambda = Qnil

◆ item_get

ID item_get

◆ item_set

ID item_set

◆ length

ID length

◆ secondary_map

VALUE secondary_map = Qnil

◆ secondary_map_mutex

VALUE secondary_map_mutex = Qnil

◆ weak_obj_cache

VALUE weak_obj_cache = Qnil
Arena_free
static void Arena_free(void *data)
Definition: protobuf/ruby/ext/google/protobuf_c/protobuf.c:180
Arena_mark
static void Arena_mark(void *data)
Definition: protobuf/ruby/ext/google/protobuf_c/protobuf.c:175


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:27