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 (VALUE val, const upb_fielddef *field)
 
static void check_repeated_field_type (VALUE val, const upb_fielddef *field)
 
MessageLayoutcreate_layout (const upb_msgdef *msgdef)
 
bool field_contains_hasbit (MessageLayout *layout, const upb_fielddef *field)
 
VALUE field_type_class (const upb_fielddef *field)
 
void free_layout (MessageLayout *layout)
 
bool is_map_field (const upb_fielddef *field)
 
static bool is_ruby_num (VALUE value)
 
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 voidslot_memory (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
static uint32_t * slot_oneof_case (MessageLayout *layout, const void *storage, const upb_fielddef *field)
 
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 458 of file ruby/ext/google/protobuf_c/storage.c.

◆ check_map_field_type()

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

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

◆ check_repeated_field_type()

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

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

◆ create_layout()

MessageLayout* create_layout ( const upb_msgdef msgdef)

Definition at line 463 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 452 of file ruby/ext/google/protobuf_c/storage.c.

◆ field_type_class()

VALUE field_type_class ( const upb_fielddef field)

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

◆ free_layout()

void free_layout ( MessageLayout layout)

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

◆ is_map_field()

bool is_map_field ( const upb_fielddef field)

Definition at line 417 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.

◆ layout_clear()

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

Definition at line 647 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 947 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_dup()

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

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

◆ layout_eq()

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

Definition at line 981 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 743 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_get_default()

VALUE layout_get_default ( const upb_fielddef field)

Definition at line 707 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 640 of file ruby/ext/google/protobuf_c/storage.c.

◆ layout_hash()

VALUE layout_hash ( MessageLayout layout,
void storage 
)

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

◆ layout_init()

void layout_init ( MessageLayout layout,
void storage 
)

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

◆ layout_inspect()

VALUE layout_inspect ( MessageLayout layout,
void storage 
)

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

◆ layout_mark()

void layout_mark ( MessageLayout layout,
void storage 
)

Definition at line 894 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 834 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 436 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 411 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 442 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 426 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 431 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 362 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 358 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 382 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 272 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 308 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 346 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 114 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 120 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 620 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 628 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 597 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_fielddef field 
)
static

Definition at line 604 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 611 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 401 of file ruby/ext/google/protobuf_c/storage.c.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:04