Macros | Functions
ruby/ext/google/protobuf_c/storage.c File Reference
#include "protobuf.h"
#include <math.h>
#include <ruby/encoding.h>
Include dependency graph for ruby/ext/google/protobuf_c/storage.c:

Go to the source code of this file.

Macros

#define CHARPTR_AT(msg, ofs)   ((char*)msg + ofs)
 
#define DEREF(memory, type)   *(type*)(memory)
 
#define DEREF_OFFSET(msg, ofs, type)   *(type*)CHARPTR_AT(msg, ofs)
 

Functions

static size_t align_up_to (size_t offset, size_t granularity)
 
static void check_map_field_type (const MessageLayout *layout, VALUE val, const upb_fielddef *field)
 
static void check_repeated_field_type (const MessageLayout *layout, VALUE val, const upb_fielddef *field)
 
void create_layout (Descriptor *desc)
 
bool field_contains_hasbit (MessageLayout *layout, const upb_fielddef *field)
 
VALUE field_type_class (const MessageLayout *layout, const upb_fielddef *field)
 
void free_layout (MessageLayout *layout)
 
bool is_map_field (const upb_fielddef *field)
 
static bool is_ruby_num (VALUE value)
 
bool is_value_field (const upb_fielddef *f)
 
void layout_clear (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
void layout_deep_copy (MessageLayout *layout, void *to, void *from)
 
void layout_dup (MessageLayout *layout, void *to, void *from)
 
VALUE layout_eq (MessageLayout *layout, void *msg1, void *msg2)
 
VALUE layout_get (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
VALUE layout_get_default (const upb_fielddef *field)
 
VALUE layout_has (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
VALUE layout_hash (MessageLayout *layout, void *storage)
 
void layout_init (MessageLayout *layout, void *storage)
 
VALUE layout_inspect (MessageLayout *layout, void *storage)
 
void layout_mark (MessageLayout *layout, void *storage)
 
void layout_set (MessageLayout *layout, void *storage, const upb_fielddef *field, VALUE val)
 
const upb_fielddefmap_entry_key (const upb_msgdef *msgdef)
 
const upb_msgdefmap_entry_msgdef (const upb_fielddef *field)
 
const upb_fielddefmap_entry_value (const upb_msgdef *msgdef)
 
const upb_fielddefmap_field_key (const upb_fielddef *field)
 
const upb_fielddefmap_field_value (const upb_fielddef *field)
 
void native_slot_check_int_range_precision (const char *name, upb_fieldtype_t type, VALUE val)
 
void native_slot_deep_copy (upb_fieldtype_t type, void *to, void *from)
 
void native_slot_dup (upb_fieldtype_t type, void *to, void *from)
 
VALUE native_slot_encode_and_freeze_string (upb_fieldtype_t type, VALUE value)
 
bool native_slot_eq (upb_fieldtype_t type, void *mem1, void *mem2)
 
VALUE native_slot_get (upb_fieldtype_t type, VALUE type_class, const void *memory)
 
void native_slot_init (upb_fieldtype_t type, void *memory)
 
void native_slot_mark (upb_fieldtype_t type, void *memory)
 
void native_slot_set (const char *name, upb_fieldtype_t type, VALUE type_class, void *memory, VALUE value)
 
void native_slot_set_value_and_case (const char *name, upb_fieldtype_t type, VALUE type_class, void *memory, VALUE value, uint32_t *case_memory, uint32_t case_number)
 
size_t native_slot_size (upb_fieldtype_t type)
 
static void slot_clear_hasbit (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
static bool slot_is_hasbit_set (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
static void * slot_memory (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
static uint32_tslot_oneof_case (MessageLayout *layout, const void *storage, const upb_oneofdef *oneof)
 
uint32_t slot_read_oneof_case (MessageLayout *layout, const void *storage, const upb_oneofdef *oneof)
 
static void slot_set_hasbit (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
const upb_msgdeftryget_map_entry_msgdef (const upb_fielddef *field)
 

Macro Definition Documentation

◆ CHARPTR_AT

#define CHARPTR_AT (   msg,
  ofs 
)    ((char*)msg + ofs)

Definition at line 41 of file ruby/ext/google/protobuf_c/storage.c.

◆ DEREF

#define DEREF (   memory,
  type 
)    *(type*)(memory)

Definition at line 43 of file ruby/ext/google/protobuf_c/storage.c.

◆ DEREF_OFFSET

#define DEREF_OFFSET (   msg,
  ofs,
  type 
)    *(type*)CHARPTR_AT(msg, ofs)

Definition at line 42 of file ruby/ext/google/protobuf_c/storage.c.

Function Documentation

◆ align_up_to()

static size_t align_up_to ( size_t  offset,
size_t  granularity 
)
static

Definition at line 471 of file ruby/ext/google/protobuf_c/storage.c.

◆ check_map_field_type()

static void check_map_field_type ( const MessageLayout layout,
VALUE  val,
const upb_fielddef field 
)
static

Definition at line 871 of file ruby/ext/google/protobuf_c/storage.c.

◆ check_repeated_field_type()

static void check_repeated_field_type ( const MessageLayout layout,
VALUE  val,
const upb_fielddef field 
)
static

Definition at line 851 of file ruby/ext/google/protobuf_c/storage.c.

◆ create_layout()

void create_layout ( Descriptor desc)

Definition at line 481 of file ruby/ext/google/protobuf_c/storage.c.

◆ field_contains_hasbit()

bool field_contains_hasbit ( MessageLayout layout,
const upb_fielddef field 
)

Definition at line 465 of file ruby/ext/google/protobuf_c/storage.c.

◆ field_type_class()

VALUE field_type_class ( const MessageLayout layout,
const upb_fielddef field 
)

Definition at line 659 of file ruby/ext/google/protobuf_c/storage.c.

◆ free_layout()

void free_layout ( MessageLayout layout)

Definition at line 652 of file ruby/ext/google/protobuf_c/storage.c.

◆ is_map_field()

bool is_map_field ( const upb_fielddef field)

Definition at line 430 of file ruby/ext/google/protobuf_c/storage.c.

◆ is_ruby_num()

static bool is_ruby_num ( VALUE  value)
static

Definition at line 62 of file ruby/ext/google/protobuf_c/storage.c.

◆ is_value_field()

bool is_value_field ( const upb_fielddef f)

Definition at line 476 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_clear()

void layout_clear ( MessageLayout layout,
const void *  storage,
const upb_fielddef field 
)

Definition at line 729 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_deep_copy()

void layout_deep_copy ( MessageLayout layout,
void *  to,
void *  from 
)

Definition at line 1011 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_dup()

void layout_dup ( MessageLayout layout,
void *  to,
void *  from 
)

Definition at line 977 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_eq()

VALUE layout_eq ( MessageLayout layout,
void *  msg1,
void *  msg2 
)

Definition at line 1047 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_get()

VALUE layout_get ( MessageLayout layout,
const void *  storage,
const upb_fielddef field 
)

Definition at line 822 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_get_default()

VALUE layout_get_default ( const upb_fielddef field)

Definition at line 790 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_has()

VALUE layout_has ( MessageLayout layout,
const void *  storage,
const upb_fielddef field 
)

Definition at line 722 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_hash()

VALUE layout_hash ( MessageLayout layout,
void *  storage 
)

Definition at line 1089 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_init()

void layout_init ( MessageLayout layout,
void *  storage 
)

Definition at line 946 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_inspect()

VALUE layout_inspect ( MessageLayout layout,
void *  storage 
)

Definition at line 1105 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_mark()

void layout_mark ( MessageLayout layout,
void *  storage 
)

Definition at line 959 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_set()

void layout_set ( MessageLayout layout,
void *  storage,
const upb_fielddef field,
VALUE  val 
)

Definition at line 894 of file ruby/ext/google/protobuf_c/storage.c.

◆ map_entry_key()

const upb_fielddef* map_entry_key ( const upb_msgdef msgdef)

Definition at line 449 of file ruby/ext/google/protobuf_c/storage.c.

◆ map_entry_msgdef()

const upb_msgdef* map_entry_msgdef ( const upb_fielddef field)

Definition at line 424 of file ruby/ext/google/protobuf_c/storage.c.

◆ map_entry_value()

const upb_fielddef* map_entry_value ( const upb_msgdef msgdef)

Definition at line 455 of file ruby/ext/google/protobuf_c/storage.c.

◆ map_field_key()

const upb_fielddef* map_field_key ( const upb_fielddef field)

Definition at line 439 of file ruby/ext/google/protobuf_c/storage.c.

◆ map_field_value()

const upb_fielddef* map_field_value ( const upb_fielddef field)

Definition at line 444 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_check_int_range_precision()

void native_slot_check_int_range_precision ( const char *  name,
upb_fieldtype_t  type,
VALUE  val 
)

Definition at line 68 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_deep_copy()

void native_slot_deep_copy ( upb_fieldtype_t  type,
void *  to,
void *  from 
)

Definition at line 375 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_dup()

void native_slot_dup ( upb_fieldtype_t  type,
void *  to,
void *  from 
)

Definition at line 371 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_encode_and_freeze_string()

VALUE native_slot_encode_and_freeze_string ( upb_fieldtype_t  type,
VALUE  value 
)

Definition at line 94 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_eq()

bool native_slot_eq ( upb_fieldtype_t  type,
void *  mem1,
void *  mem2 
)

Definition at line 395 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_get()

VALUE native_slot_get ( upb_fieldtype_t  type,
VALUE  type_class,
const void *  memory 
)

Definition at line 285 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_init()

void native_slot_init ( upb_fieldtype_t  type,
void *  memory 
)

Definition at line 321 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_mark()

void native_slot_mark ( upb_fieldtype_t  type,
void *  memory 
)

Definition at line 359 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_set()

void native_slot_set ( const char *  name,
upb_fieldtype_t  type,
VALUE  type_class,
void *  memory,
VALUE  value 
)

Definition at line 116 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_set_value_and_case()

void native_slot_set_value_and_case ( const char *  name,
upb_fieldtype_t  type,
VALUE  type_class,
void *  memory,
VALUE  value,
uint32_t case_memory,
uint32_t  case_number 
)

Definition at line 122 of file ruby/ext/google/protobuf_c/storage.c.

◆ native_slot_size()

size_t native_slot_size ( upb_fieldtype_t  type)

Definition at line 45 of file ruby/ext/google/protobuf_c/storage.c.

◆ slot_clear_hasbit()

static void slot_clear_hasbit ( MessageLayout layout,
const void *  storage,
const upb_fielddef field 
)
static

Definition at line 702 of file ruby/ext/google/protobuf_c/storage.c.

◆ slot_is_hasbit_set()

static bool slot_is_hasbit_set ( MessageLayout layout,
const void *  storage,
const upb_fielddef field 
)
static

Definition at line 710 of file ruby/ext/google/protobuf_c/storage.c.

◆ slot_memory()

static void* slot_memory ( MessageLayout layout,
const void *  storage,
const upb_fielddef field 
)
static

Definition at line 673 of file ruby/ext/google/protobuf_c/storage.c.

◆ slot_oneof_case()

static uint32_t* slot_oneof_case ( MessageLayout layout,
const void *  storage,
const upb_oneofdef oneof 
)
static

Definition at line 680 of file ruby/ext/google/protobuf_c/storage.c.

◆ slot_read_oneof_case()

uint32_t slot_read_oneof_case ( MessageLayout layout,
const void *  storage,
const upb_oneofdef oneof 
)

Definition at line 687 of file ruby/ext/google/protobuf_c/storage.c.

◆ slot_set_hasbit()

static void slot_set_hasbit ( MessageLayout layout,
const void *  storage,
const upb_fielddef field 
)
static

Definition at line 693 of file ruby/ext/google/protobuf_c/storage.c.

◆ tryget_map_entry_msgdef()

const upb_msgdef* tryget_map_entry_msgdef ( const upb_fielddef field)

Definition at line 414 of file ruby/ext/google/protobuf_c/storage.c.



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