Classes | Macros | Typedefs | Functions | Variables
protobuf/php/ext/google/protobuf/def.c File Reference
#include "def.h"
#include <php.h>
#include <Zend/zend_exceptions.h>
#include "names.h"
#include "php-upb.h"
#include "protobuf.h"
Include dependency graph for protobuf/php/ext/google/protobuf/def.c:

Go to the source code of this file.

Classes

struct  DescriptorPool
 
struct  EnumDescriptor
 
struct  EnumValueDescriptor
 
struct  FieldDescriptor
 
struct  OneofDescriptor
 

Macros

#define CASE(descriptor_type, type)
 
#define STR(str)   (str), strlen(str)
 

Typedefs

typedef struct DescriptorPool DescriptorPool
 

Functions

static void add_descriptor (DescriptorPool *pool, const google_protobuf_FileDescriptorProto *file)
 
static void add_descriptor_set (DescriptorPool *pool, const char *data, int data_len, upb_arena *arena)
 
static void add_name_mappings (const upb_filedef *file)
 
static void CheckUpbStatus (const upb_status *status, const char *msg)
 
static zend_object * CreateHandler_ReturnNull (zend_class_entry *class_type)
 
void Def_ModuleInit ()
 
bool depends_on_descriptor (const google_protobuf_FileDescriptorProto *file)
 
static void Descriptor_destructor (zend_object *obj)
 
static void Descriptor_FromClassEntry (zval *val, zend_class_entry *ce)
 
void Descriptor_FromMessageDef (zval *val, const upb_msgdef *m)
 
DescriptorDescriptor_GetFromClassEntry (zend_class_entry *ce)
 
DescriptorDescriptor_GetFromFieldDef (const upb_fielddef *f)
 
DescriptorDescriptor_GetFromMessageDef (const upb_msgdef *m)
 
static DescriptorDescriptor_GetFromZval (zval *val)
 
static zend_class_entry * Descriptor_GetGeneratedClass (const upb_msgdef *m)
 
void DescriptorPool_AddDescriptor (const char *filename, const char *data, int size)
 
void DescriptorPool_CreateWithSymbolTable (zval *zv, upb_symtab *symtab)
 
static void DescriptorPool_destructor (zend_object *obj)
 
upb_symtabDescriptorPool_GetSymbolTable ()
 
bool DescriptorPool_HasFile (const char *filename)
 
static void EnumDescriptor_destructor (zend_object *obj)
 
static void EnumDescriptor_FromClassEntry (zval *val, zend_class_entry *ce)
 
static void EnumDescriptor_FromEnumDef (zval *val, const upb_enumdef *m)
 
static void EnumValueDescriptor_Make (zval *val, const char *name, int32_t number)
 
static void FieldDescriptor_destructor (zend_object *obj)
 
static void FieldDescriptor_FromFieldDef (zval *val, const upb_fielddef *f)
 
static DescriptorPoolGetPool (const zval *this_ptr)
 
static void OneofDescriptor_destructor (zend_object *obj)
 
static void OneofDescriptor_FromOneofDef (zval *val, const upb_oneofdef *o)
 
 PHP_METHOD (Descriptor, getClass)
 
 PHP_METHOD (Descriptor, getField)
 
 PHP_METHOD (Descriptor, getFieldCount)
 
 PHP_METHOD (Descriptor, getFullName)
 
 PHP_METHOD (Descriptor, getOneofDecl)
 
 PHP_METHOD (Descriptor, getOneofDeclCount)
 
 PHP_METHOD (Descriptor, getPublicDescriptor)
 
 PHP_METHOD (DescriptorPool, getDescriptorByClassName)
 
 PHP_METHOD (DescriptorPool, getDescriptorByProtoName)
 
 PHP_METHOD (DescriptorPool, getEnumDescriptorByClassName)
 
 PHP_METHOD (DescriptorPool, getGeneratedPool)
 
 PHP_METHOD (DescriptorPool, internalAddGeneratedFile)
 
 PHP_METHOD (EnumDescriptor, getPublicDescriptor)
 
 PHP_METHOD (EnumDescriptor, getValue)
 
 PHP_METHOD (EnumDescriptor, getValueCount)
 
 PHP_METHOD (EnumValueDescriptor, getName)
 
 PHP_METHOD (EnumValueDescriptor, getNumber)
 
 PHP_METHOD (FieldDescriptor, getEnumType)
 
 PHP_METHOD (FieldDescriptor, getLabel)
 
 PHP_METHOD (FieldDescriptor, getMessageType)
 
 PHP_METHOD (FieldDescriptor, getName)
 
 PHP_METHOD (FieldDescriptor, getNumber)
 
 PHP_METHOD (FieldDescriptor, getType)
 
 PHP_METHOD (FieldDescriptor, isMap)
 
 PHP_METHOD (InternalDescriptorPool, getGeneratedPool)
 
 PHP_METHOD (OneofDescriptor, getField)
 
 PHP_METHOD (OneofDescriptor, getFieldCount)
 
 PHP_METHOD (OneofDescriptor, getName)
 
upb_fieldtype_t to_fieldtype (upb_descriptortype_t type)
 

Variables

zend_class_entry * Descriptor_class_entry
 
static zend_function_entry Descriptor_methods []
 
static zend_object_handlers Descriptor_object_handlers
 
zend_class_entry * DescriptorPool_class_entry
 
static zend_function_entry DescriptorPool_methods []
 
static zend_object_handlers DescriptorPool_object_handlers
 
zend_class_entry * EnumDescriptor_class_entry
 
static zend_function_entry EnumDescriptor_methods []
 
static zend_object_handlers EnumDescriptor_object_handlers
 
zend_class_entry * EnumValueDescriptor_class_entry
 
static zend_function_entry EnumValueDescriptor_methods []
 
static zend_object_handlers EnumValueDescriptor_object_handlers
 
zend_class_entry * FieldDescriptor_class_entry
 
static zend_function_entry FieldDescriptor_methods []
 
static zend_object_handlers FieldDescriptor_object_handlers
 
static zend_function_entry gpb_type_methods []
 
zend_class_entry * gpb_type_type
 
zend_class_entry * InternalDescriptorPool_class_entry
 
static zend_function_entry InternalDescriptorPool_methods []
 
zend_class_entry * OneofDescriptor_class_entry
 
static zend_function_entry OneofDescriptor_methods []
 
static zend_object_handlers OneofDescriptor_object_handlers
 

Macro Definition Documentation

◆ CASE

#define CASE (   descriptor_type,
  type 
)
Value:
case UPB_DESCRIPTOR_TYPE_##descriptor_type: \
return UPB_TYPE_##type;

◆ STR

#define STR (   str)    (str), strlen(str)

Typedef Documentation

◆ DescriptorPool

Function Documentation

◆ add_descriptor()

static void add_descriptor ( DescriptorPool pool,
const google_protobuf_FileDescriptorProto file 
)
static

Definition at line 893 of file protobuf/php/ext/google/protobuf/def.c.

◆ add_descriptor_set()

static void add_descriptor_set ( DescriptorPool pool,
const char *  data,
int  data_len,
upb_arena arena 
)
static

Definition at line 928 of file protobuf/php/ext/google/protobuf/def.c.

◆ add_name_mappings()

static void add_name_mappings ( const upb_filedef file)
static

Definition at line 882 of file protobuf/php/ext/google/protobuf/def.c.

◆ CheckUpbStatus()

static void CheckUpbStatus ( const upb_status status,
const char *  msg 
)
static

Definition at line 42 of file protobuf/php/ext/google/protobuf/def.c.

◆ CreateHandler_ReturnNull()

static zend_object* CreateHandler_ReturnNull ( zend_class_entry *  class_type)
static

Definition at line 51 of file protobuf/php/ext/google/protobuf/def.c.

◆ Def_ModuleInit()

void Def_ModuleInit ( )

Definition at line 1051 of file protobuf/php/ext/google/protobuf/def.c.

◆ depends_on_descriptor()

bool depends_on_descriptor ( const google_protobuf_FileDescriptorProto file)

Definition at line 862 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_destructor()

static void Descriptor_destructor ( zend_object *  obj)
static

Definition at line 509 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_FromClassEntry()

static void Descriptor_FromClassEntry ( zval *  val,
zend_class_entry *  ce 
)
static

Definition at line 556 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_FromMessageDef()

void Descriptor_FromMessageDef ( zval *  val,
const upb_msgdef m 
)

Definition at line 530 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_GetFromClassEntry()

Descriptor* Descriptor_GetFromClassEntry ( zend_class_entry *  ce)

Definition at line 578 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_GetFromFieldDef()

Descriptor* Descriptor_GetFromFieldDef ( const upb_fielddef f)

Definition at line 590 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_GetFromMessageDef()

Descriptor* Descriptor_GetFromMessageDef ( const upb_msgdef m)

Definition at line 584 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_GetFromZval()

static Descriptor* Descriptor_GetFromZval ( zval *  val)
static

Definition at line 564 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_GetGeneratedClass()

static zend_class_entry* Descriptor_GetGeneratedClass ( const upb_msgdef m)
static

Definition at line 514 of file protobuf/php/ext/google/protobuf/def.c.

◆ DescriptorPool_AddDescriptor()

void DescriptorPool_AddDescriptor ( const char *  filename,
const char *  data,
int  size 
)

Definition at line 954 of file protobuf/php/ext/google/protobuf/def.c.

◆ DescriptorPool_CreateWithSymbolTable()

void DescriptorPool_CreateWithSymbolTable ( zval *  zv,
upb_symtab symtab 
)

Definition at line 746 of file protobuf/php/ext/google/protobuf/def.c.

◆ DescriptorPool_destructor()

static void DescriptorPool_destructor ( zend_object *  obj)
static

Object handler to free an DescriptorPool.

Definition at line 736 of file protobuf/php/ext/google/protobuf/def.c.

◆ DescriptorPool_GetSymbolTable()

upb_symtab* DescriptorPool_GetSymbolTable ( )

Definition at line 755 of file protobuf/php/ext/google/protobuf/def.c.

◆ DescriptorPool_HasFile()

bool DescriptorPool_HasFile ( const char *  filename)

Definition at line 949 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumDescriptor_destructor()

static void EnumDescriptor_destructor ( zend_object *  obj)
static

Definition at line 127 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumDescriptor_FromClassEntry()

static void EnumDescriptor_FromClassEntry ( zval *  val,
zend_class_entry *  ce 
)
static

Definition at line 133 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumDescriptor_FromEnumDef()

static void EnumDescriptor_FromEnumDef ( zval *  val,
const upb_enumdef m 
)
static

Definition at line 160 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumValueDescriptor_Make()

static void EnumValueDescriptor_Make ( zval *  val,
const char *  name,
int32_t  number 
)
static

Definition at line 77 of file protobuf/php/ext/google/protobuf/def.c.

◆ FieldDescriptor_destructor()

static void FieldDescriptor_destructor ( zend_object *  obj)
static

Definition at line 346 of file protobuf/php/ext/google/protobuf/def.c.

◆ FieldDescriptor_FromFieldDef()

static void FieldDescriptor_FromFieldDef ( zval *  val,
const upb_fielddef f 
)
static

Definition at line 352 of file protobuf/php/ext/google/protobuf/def.c.

◆ GetPool()

static DescriptorPool* GetPool ( const zval *  this_ptr)
static

Definition at line 729 of file protobuf/php/ext/google/protobuf/def.c.

◆ OneofDescriptor_destructor()

static void OneofDescriptor_destructor ( zend_object *  obj)
static

Definition at line 253 of file protobuf/php/ext/google/protobuf/def.c.

◆ OneofDescriptor_FromOneofDef()

static void OneofDescriptor_FromOneofDef ( zval *  val,
const upb_oneofdef o 
)
static

Definition at line 258 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [1/28]

PHP_METHOD ( Descriptor  ,
getClass   
)

Definition at line 699 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [2/28]

PHP_METHOD ( Descriptor  ,
getField   
)

Definition at line 621 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [3/28]

PHP_METHOD ( Descriptor  ,
getFieldCount   
)

Definition at line 646 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [4/28]

PHP_METHOD ( Descriptor  ,
getFullName   
)

Definition at line 610 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [5/28]

PHP_METHOD ( Descriptor  ,
getOneofDecl   
)

Definition at line 657 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [6/28]

PHP_METHOD ( Descriptor  ,
getOneofDeclCount   
)

Definition at line 689 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [7/28]

PHP_METHOD ( Descriptor  ,
getPublicDescriptor   
)

Definition at line 601 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [8/28]

PHP_METHOD ( DescriptorPool  ,
getDescriptorByClassName   
)

Definition at line 777 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [9/28]

PHP_METHOD ( DescriptorPool  ,
getDescriptorByProtoName   
)

Definition at line 835 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [10/28]

PHP_METHOD ( DescriptorPool  ,
getEnumDescriptorByClassName   
)

Definition at line 806 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [11/28]

PHP_METHOD ( DescriptorPool  ,
getGeneratedPool   
)

Definition at line 766 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [12/28]

PHP_METHOD ( DescriptorPool  ,
internalAddGeneratedFile   
)

Definition at line 974 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [13/28]

PHP_METHOD ( EnumDescriptor  ,
getPublicDescriptor   
)

Definition at line 230 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [14/28]

PHP_METHOD ( EnumDescriptor  ,
getValue   
)

Definition at line 186 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [15/28]

PHP_METHOD ( EnumDescriptor  ,
getValueCount   
)

Definition at line 218 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [16/28]

PHP_METHOD ( EnumValueDescriptor  ,
getName   
)

Definition at line 93 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [17/28]

PHP_METHOD ( EnumValueDescriptor  ,
getNumber   
)

Definition at line 103 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [18/28]

PHP_METHOD ( FieldDescriptor  ,
getEnumType   
)

Definition at line 456 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [19/28]

PHP_METHOD ( FieldDescriptor  ,
getLabel   
)

Definition at line 426 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [20/28]

PHP_METHOD ( FieldDescriptor  ,
getMessageType   
)

Definition at line 477 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [21/28]

PHP_METHOD ( FieldDescriptor  ,
getName   
)

Definition at line 406 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [22/28]

PHP_METHOD ( FieldDescriptor  ,
getNumber   
)

Definition at line 416 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [23/28]

PHP_METHOD ( FieldDescriptor  ,
getType   
)

Definition at line 436 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [24/28]

PHP_METHOD ( FieldDescriptor  ,
isMap   
)

Definition at line 446 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [25/28]

PHP_METHOD ( InternalDescriptorPool  ,
getGeneratedPool   
)

Definition at line 1027 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [26/28]

PHP_METHOD ( OneofDescriptor  ,
getField   
)

Definition at line 290 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [27/28]

PHP_METHOD ( OneofDescriptor  ,
getFieldCount   
)

Definition at line 322 of file protobuf/php/ext/google/protobuf/def.c.

◆ PHP_METHOD() [28/28]

PHP_METHOD ( OneofDescriptor  ,
getName   
)

Definition at line 279 of file protobuf/php/ext/google/protobuf/def.c.

◆ to_fieldtype()

upb_fieldtype_t to_fieldtype ( upb_descriptortype_t  type)

Definition at line 368 of file protobuf/php/ext/google/protobuf/def.c.

Variable Documentation

◆ Descriptor_class_entry

zend_class_entry* Descriptor_class_entry

Definition at line 506 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_methods

zend_function_entry Descriptor_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 706 of file protobuf/php/ext/google/protobuf/def.c.

◆ Descriptor_object_handlers

zend_object_handlers Descriptor_object_handlers
static

Definition at line 507 of file protobuf/php/ext/google/protobuf/def.c.

◆ DescriptorPool_class_entry

zend_class_entry* DescriptorPool_class_entry

Definition at line 726 of file protobuf/php/ext/google/protobuf/def.c.

◆ DescriptorPool_methods

zend_function_entry DescriptorPool_methods[]
static
Initial value:
= {
PHP_ME(DescriptorPool, getGeneratedPool, arginfo_void,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_FE_END
}

Definition at line 1000 of file protobuf/php/ext/google/protobuf/def.c.

◆ DescriptorPool_object_handlers

zend_object_handlers DescriptorPool_object_handlers
static

Definition at line 727 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumDescriptor_class_entry

zend_class_entry* EnumDescriptor_class_entry

Definition at line 124 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumDescriptor_methods

zend_function_entry EnumDescriptor_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 234 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumDescriptor_object_handlers

zend_object_handlers EnumDescriptor_object_handlers
static

Definition at line 125 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumValueDescriptor_class_entry

zend_class_entry* EnumValueDescriptor_class_entry

Definition at line 69 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumValueDescriptor_methods

zend_function_entry EnumValueDescriptor_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 108 of file protobuf/php/ext/google/protobuf/def.c.

◆ EnumValueDescriptor_object_handlers

zend_object_handlers EnumValueDescriptor_object_handlers
static

Definition at line 70 of file protobuf/php/ext/google/protobuf/def.c.

◆ FieldDescriptor_class_entry

zend_class_entry* FieldDescriptor_class_entry

Definition at line 343 of file protobuf/php/ext/google/protobuf/def.c.

◆ FieldDescriptor_methods

zend_function_entry FieldDescriptor_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 491 of file protobuf/php/ext/google/protobuf/def.c.

◆ FieldDescriptor_object_handlers

zend_object_handlers FieldDescriptor_object_handlers
static

Definition at line 344 of file protobuf/php/ext/google/protobuf/def.c.

◆ gpb_type_methods

zend_function_entry gpb_type_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 1043 of file protobuf/php/ext/google/protobuf/def.c.

◆ gpb_type_type

zend_class_entry* gpb_type_type

Definition at line 1041 of file protobuf/php/ext/google/protobuf/def.c.

◆ InternalDescriptorPool_class_entry

zend_class_entry* InternalDescriptorPool_class_entry

Definition at line 1018 of file protobuf/php/ext/google/protobuf/def.c.

◆ InternalDescriptorPool_methods

zend_function_entry InternalDescriptorPool_methods[]
static
Initial value:
= {
PHP_ME(InternalDescriptorPool, getGeneratedPool, arginfo_void,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_FE_END
}

Definition at line 1031 of file protobuf/php/ext/google/protobuf/def.c.

◆ OneofDescriptor_class_entry

zend_class_entry* OneofDescriptor_class_entry

Definition at line 250 of file protobuf/php/ext/google/protobuf/def.c.

◆ OneofDescriptor_methods

zend_function_entry OneofDescriptor_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 327 of file protobuf/php/ext/google/protobuf/def.c.

◆ OneofDescriptor_object_handlers

zend_object_handlers OneofDescriptor_object_handlers
static

Definition at line 251 of file protobuf/php/ext/google/protobuf/def.c.

InternalDescriptorPool
struct InternalDescriptorPool InternalDescriptorPool
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:654
descriptor_type
zend_class_entry * descriptor_type
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
DescriptorPool
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:110


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