webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions | Variables
defs.c File Reference
#include "protobuf.h"

Macros

#define DEFINE_CLASS(name, string_name)
 
#define DEFINE_SELF(type, var, rb_var)   type* var = ruby_to_ ## type(rb_var)
 
#define CONVERT(upb, ruby)
 
#define CONVERT(upb, ruby)   case UPB_TYPE_ ## upb : return ID2SYM(rb_intern( # ruby ));
 
#define CONVERT(upb, ruby)
 
#define CONVERT(upb, ruby)   case UPB_DESCRIPTOR_TYPE_ ## upb : return ID2SYM(rb_intern( # ruby ));
 
#define CONVERT(upb, ruby)   case UPB_LABEL_ ## upb : return ID2SYM(rb_intern( # ruby ));
 
#define CONVERT(upb, ruby)
 

Functions

 DEFINE_CLASS (DescriptorPool, "Google::Protobuf::DescriptorPool")
 
void DescriptorPool_mark (void *_self)
 
void DescriptorPool_free (void *_self)
 
VALUE DescriptorPool_alloc (VALUE klass)
 
void DescriptorPool_register (VALUE module)
 
VALUE DescriptorPool_add (VALUE _self, VALUE def)
 
VALUE DescriptorPool_build (VALUE _self)
 
VALUE DescriptorPool_lookup (VALUE _self, VALUE name)
 
VALUE DescriptorPool_generated_pool (VALUE _self)
 
 DEFINE_CLASS (Descriptor, "Google::Protobuf::Descriptor")
 
void Descriptor_mark (void *_self)
 
void Descriptor_free (void *_self)
 
VALUE Descriptor_alloc (VALUE klass)
 
void Descriptor_register (VALUE module)
 
VALUE Descriptor_name (VALUE _self)
 
VALUE Descriptor_name_set (VALUE _self, VALUE str)
 
VALUE Descriptor_each (VALUE _self)
 
VALUE Descriptor_lookup (VALUE _self, VALUE name)
 
VALUE Descriptor_add_field (VALUE _self, VALUE obj)
 
VALUE Descriptor_add_oneof (VALUE _self, VALUE obj)
 
VALUE Descriptor_each_oneof (VALUE _self)
 
VALUE Descriptor_lookup_oneof (VALUE _self, VALUE name)
 
VALUE Descriptor_msgclass (VALUE _self)
 
 DEFINE_CLASS (FieldDescriptor, "Google::Protobuf::FieldDescriptor")
 
void FieldDescriptor_mark (void *_self)
 
void FieldDescriptor_free (void *_self)
 
VALUE FieldDescriptor_alloc (VALUE klass)
 
void FieldDescriptor_register (VALUE module)
 
VALUE FieldDescriptor_name (VALUE _self)
 
VALUE FieldDescriptor_name_set (VALUE _self, VALUE str)
 
upb_fieldtype_t ruby_to_fieldtype (VALUE type)
 
VALUE fieldtype_to_ruby (upb_fieldtype_t type)
 
upb_descriptortype_t ruby_to_descriptortype (VALUE type)
 
VALUE descriptortype_to_ruby (upb_descriptortype_t type)
 
VALUE FieldDescriptor_type (VALUE _self)
 
VALUE FieldDescriptor_type_set (VALUE _self, VALUE type)
 
VALUE FieldDescriptor_label (VALUE _self)
 
VALUE FieldDescriptor_label_set (VALUE _self, VALUE label)
 
VALUE FieldDescriptor_number (VALUE _self)
 
VALUE FieldDescriptor_number_set (VALUE _self, VALUE number)
 
VALUE FieldDescriptor_submsg_name (VALUE _self)
 
VALUE FieldDescriptor_submsg_name_set (VALUE _self, VALUE value)
 
VALUE FieldDescriptor_subtype (VALUE _self)
 
VALUE FieldDescriptor_get (VALUE _self, VALUE msg_rb)
 
VALUE FieldDescriptor_set (VALUE _self, VALUE msg_rb, VALUE value)
 
 DEFINE_CLASS (OneofDescriptor, "Google::Protobuf::OneofDescriptor")
 
void OneofDescriptor_mark (void *_self)
 
void OneofDescriptor_free (void *_self)
 
VALUE OneofDescriptor_alloc (VALUE klass)
 
void OneofDescriptor_register (VALUE module)
 
VALUE OneofDescriptor_name (VALUE _self)
 
VALUE OneofDescriptor_name_set (VALUE _self, VALUE value)
 
VALUE OneofDescriptor_add_field (VALUE _self, VALUE obj)
 
VALUE OneofDescriptor_each (VALUE _self, VALUE field)
 
 DEFINE_CLASS (EnumDescriptor, "Google::Protobuf::EnumDescriptor")
 
void EnumDescriptor_mark (void *_self)
 
void EnumDescriptor_free (void *_self)
 
VALUE EnumDescriptor_alloc (VALUE klass)
 
void EnumDescriptor_register (VALUE module)
 
VALUE EnumDescriptor_name (VALUE _self)
 
VALUE EnumDescriptor_name_set (VALUE _self, VALUE str)
 
VALUE EnumDescriptor_add_value (VALUE _self, VALUE name, VALUE number)
 
VALUE EnumDescriptor_lookup_name (VALUE _self, VALUE name)
 
VALUE EnumDescriptor_lookup_value (VALUE _self, VALUE number)
 
VALUE EnumDescriptor_each (VALUE _self)
 
VALUE EnumDescriptor_enummodule (VALUE _self)
 
 DEFINE_CLASS (MessageBuilderContext, "Google::Protobuf::Internal::MessageBuilderContext")
 
void MessageBuilderContext_mark (void *_self)
 
void MessageBuilderContext_free (void *_self)
 
VALUE MessageBuilderContext_alloc (VALUE klass)
 
void MessageBuilderContext_register (VALUE module)
 
VALUE MessageBuilderContext_initialize (VALUE _self, VALUE msgdef, VALUE builder)
 
VALUE MessageBuilderContext_optional (int argc, VALUE *argv, VALUE _self)
 
VALUE MessageBuilderContext_required (int argc, VALUE *argv, VALUE _self)
 
VALUE MessageBuilderContext_repeated (int argc, VALUE *argv, VALUE _self)
 
VALUE MessageBuilderContext_map (int argc, VALUE *argv, VALUE _self)
 
VALUE MessageBuilderContext_oneof (VALUE _self, VALUE name)
 
 DEFINE_CLASS (OneofBuilderContext, "Google::Protobuf::Internal::OneofBuilderContext")
 
void OneofBuilderContext_mark (void *_self)
 
void OneofBuilderContext_free (void *_self)
 
VALUE OneofBuilderContext_alloc (VALUE klass)
 
void OneofBuilderContext_register (VALUE module)
 
VALUE OneofBuilderContext_initialize (VALUE _self, VALUE oneofdef, VALUE builder)
 
VALUE OneofBuilderContext_optional (int argc, VALUE *argv, VALUE _self)
 
 DEFINE_CLASS (EnumBuilderContext, "Google::Protobuf::Internal::EnumBuilderContext")
 
void EnumBuilderContext_mark (void *_self)
 
void EnumBuilderContext_free (void *_self)
 
VALUE EnumBuilderContext_alloc (VALUE klass)
 
void EnumBuilderContext_register (VALUE module)
 
VALUE EnumBuilderContext_initialize (VALUE _self, VALUE enumdef)
 
VALUE EnumBuilderContext_value (VALUE _self, VALUE name, VALUE number)
 
 DEFINE_CLASS (Builder, "Google::Protobuf::Internal::Builder")
 
void Builder_mark (void *_self)
 
void Builder_free (void *_self)
 
VALUE Builder_alloc (VALUE klass)
 
void Builder_register (VALUE module)
 
VALUE Builder_add_message (VALUE _self, VALUE name)
 
VALUE Builder_add_enum (VALUE _self, VALUE name)
 
VALUE Builder_finalize_to_pool (VALUE _self, VALUE pool_rb)
 

Variables

VALUE generated_pool
 

Macro Definition Documentation

◆ CONVERT [1/6]

#define CONVERT (   upb,
  ruby 
)
Value:
if (SYM2ID(type) == rb_intern( # ruby )) { \
return UPB_TYPE_ ## upb; \
}
EGLenum type
Definition: eglext.h:63

◆ CONVERT [2/6]

#define CONVERT (   upb,
  ruby 
)    case UPB_TYPE_ ## upb : return ID2SYM(rb_intern( # ruby ));

◆ CONVERT [3/6]

#define CONVERT (   upb,
  ruby 
)
Value:
if (SYM2ID(type) == rb_intern( # ruby )) { \
return UPB_DESCRIPTOR_TYPE_ ## upb; \
}
EGLenum type
Definition: eglext.h:63

◆ CONVERT [4/6]

#define CONVERT (   upb,
  ruby 
)    case UPB_DESCRIPTOR_TYPE_ ## upb : return ID2SYM(rb_intern( # ruby ));

◆ CONVERT [5/6]

#define CONVERT (   upb,
  ruby 
)    case UPB_LABEL_ ## upb : return ID2SYM(rb_intern( # ruby ));

◆ CONVERT [6/6]

#define CONVERT (   upb,
  ruby 
)
Value:
if (SYM2ID(label) == rb_intern( # ruby )) { \
upb_label = UPB_LABEL_ ## upb; \
converted = true; \
}
EGLenum EGLObjectKHR EGLLabelKHR label
Definition: eglext.h:121

◆ DEFINE_CLASS

#define DEFINE_CLASS (   name,
  string_name 
)
Value:
VALUE c ## name; \
const rb_data_type_t _ ## name ## _type = { \
string_name, \
{ name ## _mark, name ## _free, NULL }, \
}; \
name* ruby_to_ ## name(VALUE val) { \
name* ret; \
TypedData_Get_Struct(val, name, &_ ## name ## _type, ret); \
return ret; \
} \
RTCMediaStreamTrackType _type
Definition: RTCMediaStreamTrack.mm:20
int c
Definition: cpp_unittests.cpp:275
int ret
Definition: test_unit_dft.c:69
EGLImageKHR EGLint * name
Definition: eglext.h:851
#define NULL
Definition: common_types.h:41
GLuint GLsizei GLsizei GLfloat * val
Definition: gl2ext.h:3301

◆ DEFINE_SELF

#define DEFINE_SELF (   type,
  var,
  rb_var 
)    type* var = ruby_to_ ## type(rb_var)

Function Documentation

◆ Builder_add_enum()

VALUE Builder_add_enum ( VALUE  _self,
VALUE  name 
)

◆ Builder_add_message()

VALUE Builder_add_message ( VALUE  _self,
VALUE  name 
)

◆ Builder_alloc()

VALUE Builder_alloc ( VALUE  klass)

◆ Builder_finalize_to_pool()

VALUE Builder_finalize_to_pool ( VALUE  _self,
VALUE  pool_rb 
)

◆ Builder_free()

void Builder_free ( void _self)

◆ Builder_mark()

void Builder_mark ( void _self)

◆ Builder_register()

void Builder_register ( VALUE  module)

◆ DEFINE_CLASS() [1/9]

DEFINE_CLASS ( DescriptorPool  ,
"Google::Protobuf::DescriptorPool"   
)

◆ DEFINE_CLASS() [2/9]

DEFINE_CLASS ( Descriptor  ,
"Google::Protobuf::Descriptor"   
)

◆ DEFINE_CLASS() [3/9]

DEFINE_CLASS ( FieldDescriptor  ,
"Google::Protobuf::FieldDescriptor"   
)

◆ DEFINE_CLASS() [4/9]

DEFINE_CLASS ( OneofDescriptor  ,
"Google::Protobuf::OneofDescriptor"   
)

◆ DEFINE_CLASS() [5/9]

DEFINE_CLASS ( EnumDescriptor  ,
"Google::Protobuf::EnumDescriptor"   
)

◆ DEFINE_CLASS() [6/9]

DEFINE_CLASS ( MessageBuilderContext  ,
"Google::Protobuf::Internal::MessageBuilderContext"   
)

◆ DEFINE_CLASS() [7/9]

DEFINE_CLASS ( OneofBuilderContext  ,
"Google::Protobuf::Internal::OneofBuilderContext"   
)

◆ DEFINE_CLASS() [8/9]

DEFINE_CLASS ( EnumBuilderContext  ,
"Google::Protobuf::Internal::EnumBuilderContext"   
)

◆ DEFINE_CLASS() [9/9]

DEFINE_CLASS ( Builder  ,
"Google::Protobuf::Internal::Builder"   
)

◆ Descriptor_add_field()

VALUE Descriptor_add_field ( VALUE  _self,
VALUE  obj 
)

◆ Descriptor_add_oneof()

VALUE Descriptor_add_oneof ( VALUE  _self,
VALUE  obj 
)

◆ Descriptor_alloc()

VALUE Descriptor_alloc ( VALUE  klass)

◆ Descriptor_each()

VALUE Descriptor_each ( VALUE  _self)

◆ Descriptor_each_oneof()

VALUE Descriptor_each_oneof ( VALUE  _self)

◆ Descriptor_free()

void Descriptor_free ( void _self)

◆ Descriptor_lookup()

VALUE Descriptor_lookup ( VALUE  _self,
VALUE  name 
)

◆ Descriptor_lookup_oneof()

VALUE Descriptor_lookup_oneof ( VALUE  _self,
VALUE  name 
)

◆ Descriptor_mark()

void Descriptor_mark ( void _self)

◆ Descriptor_msgclass()

VALUE Descriptor_msgclass ( VALUE  _self)

◆ Descriptor_name()

VALUE Descriptor_name ( VALUE  _self)

◆ Descriptor_name_set()

VALUE Descriptor_name_set ( VALUE  _self,
VALUE  str 
)

◆ Descriptor_register()

void Descriptor_register ( VALUE  module)

◆ DescriptorPool_add()

VALUE DescriptorPool_add ( VALUE  _self,
VALUE  def 
)

◆ DescriptorPool_alloc()

VALUE DescriptorPool_alloc ( VALUE  klass)

◆ DescriptorPool_build()

VALUE DescriptorPool_build ( VALUE  _self)

◆ DescriptorPool_free()

void DescriptorPool_free ( void _self)

◆ DescriptorPool_generated_pool()

VALUE DescriptorPool_generated_pool ( VALUE  _self)

◆ DescriptorPool_lookup()

VALUE DescriptorPool_lookup ( VALUE  _self,
VALUE  name 
)

◆ DescriptorPool_mark()

void DescriptorPool_mark ( void _self)

◆ DescriptorPool_register()

void DescriptorPool_register ( VALUE  module)

◆ descriptortype_to_ruby()

VALUE descriptortype_to_ruby ( upb_descriptortype_t  type)

◆ EnumBuilderContext_alloc()

VALUE EnumBuilderContext_alloc ( VALUE  klass)

◆ EnumBuilderContext_free()

void EnumBuilderContext_free ( void _self)

◆ EnumBuilderContext_initialize()

VALUE EnumBuilderContext_initialize ( VALUE  _self,
VALUE  enumdef 
)

◆ EnumBuilderContext_mark()

void EnumBuilderContext_mark ( void _self)

◆ EnumBuilderContext_register()

void EnumBuilderContext_register ( VALUE  module)

◆ EnumBuilderContext_value()

VALUE EnumBuilderContext_value ( VALUE  _self,
VALUE  name,
VALUE  number 
)

◆ EnumDescriptor_add_value()

VALUE EnumDescriptor_add_value ( VALUE  _self,
VALUE  name,
VALUE  number 
)

◆ EnumDescriptor_alloc()

VALUE EnumDescriptor_alloc ( VALUE  klass)

◆ EnumDescriptor_each()

VALUE EnumDescriptor_each ( VALUE  _self)

◆ EnumDescriptor_enummodule()

VALUE EnumDescriptor_enummodule ( VALUE  _self)

◆ EnumDescriptor_free()

void EnumDescriptor_free ( void _self)

◆ EnumDescriptor_lookup_name()

VALUE EnumDescriptor_lookup_name ( VALUE  _self,
VALUE  name 
)

◆ EnumDescriptor_lookup_value()

VALUE EnumDescriptor_lookup_value ( VALUE  _self,
VALUE  number 
)

◆ EnumDescriptor_mark()

void EnumDescriptor_mark ( void _self)

◆ EnumDescriptor_name()

VALUE EnumDescriptor_name ( VALUE  _self)

◆ EnumDescriptor_name_set()

VALUE EnumDescriptor_name_set ( VALUE  _self,
VALUE  str 
)

◆ EnumDescriptor_register()

void EnumDescriptor_register ( VALUE  module)

◆ FieldDescriptor_alloc()

VALUE FieldDescriptor_alloc ( VALUE  klass)

◆ FieldDescriptor_free()

void FieldDescriptor_free ( void _self)

◆ FieldDescriptor_get()

VALUE FieldDescriptor_get ( VALUE  _self,
VALUE  msg_rb 
)

◆ FieldDescriptor_label()

VALUE FieldDescriptor_label ( VALUE  _self)

◆ FieldDescriptor_label_set()

VALUE FieldDescriptor_label_set ( VALUE  _self,
VALUE  label 
)

◆ FieldDescriptor_mark()

void FieldDescriptor_mark ( void _self)

◆ FieldDescriptor_name()

VALUE FieldDescriptor_name ( VALUE  _self)

◆ FieldDescriptor_name_set()

VALUE FieldDescriptor_name_set ( VALUE  _self,
VALUE  str 
)

◆ FieldDescriptor_number()

VALUE FieldDescriptor_number ( VALUE  _self)

◆ FieldDescriptor_number_set()

VALUE FieldDescriptor_number_set ( VALUE  _self,
VALUE  number 
)

◆ FieldDescriptor_register()

void FieldDescriptor_register ( VALUE  module)

◆ FieldDescriptor_set()

VALUE FieldDescriptor_set ( VALUE  _self,
VALUE  msg_rb,
VALUE  value 
)

◆ FieldDescriptor_submsg_name()

VALUE FieldDescriptor_submsg_name ( VALUE  _self)

◆ FieldDescriptor_submsg_name_set()

VALUE FieldDescriptor_submsg_name_set ( VALUE  _self,
VALUE  value 
)

◆ FieldDescriptor_subtype()

VALUE FieldDescriptor_subtype ( VALUE  _self)

◆ FieldDescriptor_type()

VALUE FieldDescriptor_type ( VALUE  _self)

◆ FieldDescriptor_type_set()

VALUE FieldDescriptor_type_set ( VALUE  _self,
VALUE  type 
)

◆ fieldtype_to_ruby()

VALUE fieldtype_to_ruby ( upb_fieldtype_t  type)

◆ MessageBuilderContext_alloc()

VALUE MessageBuilderContext_alloc ( VALUE  klass)

◆ MessageBuilderContext_free()

void MessageBuilderContext_free ( void _self)

◆ MessageBuilderContext_initialize()

VALUE MessageBuilderContext_initialize ( VALUE  _self,
VALUE  msgdef,
VALUE  builder 
)

◆ MessageBuilderContext_map()

VALUE MessageBuilderContext_map ( int  argc,
VALUE *  argv,
VALUE  _self 
)

◆ MessageBuilderContext_mark()

void MessageBuilderContext_mark ( void _self)

◆ MessageBuilderContext_oneof()

VALUE MessageBuilderContext_oneof ( VALUE  _self,
VALUE  name 
)

◆ MessageBuilderContext_optional()

VALUE MessageBuilderContext_optional ( int  argc,
VALUE *  argv,
VALUE  _self 
)

◆ MessageBuilderContext_register()

void MessageBuilderContext_register ( VALUE  module)

◆ MessageBuilderContext_repeated()

VALUE MessageBuilderContext_repeated ( int  argc,
VALUE *  argv,
VALUE  _self 
)

◆ MessageBuilderContext_required()

VALUE MessageBuilderContext_required ( int  argc,
VALUE *  argv,
VALUE  _self 
)

◆ OneofBuilderContext_alloc()

VALUE OneofBuilderContext_alloc ( VALUE  klass)

◆ OneofBuilderContext_free()

void OneofBuilderContext_free ( void _self)

◆ OneofBuilderContext_initialize()

VALUE OneofBuilderContext_initialize ( VALUE  _self,
VALUE  oneofdef,
VALUE  builder 
)

◆ OneofBuilderContext_mark()

void OneofBuilderContext_mark ( void _self)

◆ OneofBuilderContext_optional()

VALUE OneofBuilderContext_optional ( int  argc,
VALUE *  argv,
VALUE  _self 
)

◆ OneofBuilderContext_register()

void OneofBuilderContext_register ( VALUE  module)

◆ OneofDescriptor_add_field()

VALUE OneofDescriptor_add_field ( VALUE  _self,
VALUE  obj 
)

◆ OneofDescriptor_alloc()

VALUE OneofDescriptor_alloc ( VALUE  klass)

◆ OneofDescriptor_each()

VALUE OneofDescriptor_each ( VALUE  _self,
VALUE  field 
)

◆ OneofDescriptor_free()

void OneofDescriptor_free ( void _self)

◆ OneofDescriptor_mark()

void OneofDescriptor_mark ( void _self)

◆ OneofDescriptor_name()

VALUE OneofDescriptor_name ( VALUE  _self)

◆ OneofDescriptor_name_set()

VALUE OneofDescriptor_name_set ( VALUE  _self,
VALUE  value 
)

◆ OneofDescriptor_register()

void OneofDescriptor_register ( VALUE  module)

◆ ruby_to_descriptortype()

upb_descriptortype_t ruby_to_descriptortype ( VALUE  type)

◆ ruby_to_fieldtype()

upb_fieldtype_t ruby_to_fieldtype ( VALUE  type)

Variable Documentation

◆ generated_pool

VALUE generated_pool