Classes | Functions | Variables
descriptor_pool.c File Reference
#include "python/descriptor_pool.h"
#include "google/protobuf/descriptor.upbdefs.h"
#include "python/convert.h"
#include "python/descriptor.h"
#include "python/message.h"
#include "python/protobuf.h"
#include "upb/def.h"
#include "upb/util/def_to_proto.h"
Include dependency graph for descriptor_pool.c:

Go to the source code of this file.

Classes

struct  PyUpb_DescriptorPool
 

Functions

static PyObject * PyUpb_DescriptorPool_Add (PyObject *_self, PyObject *file_desc)
 
static PyObject * PyUpb_DescriptorPool_AddSerializedFile (PyObject *_self, PyObject *serialized_pb)
 
bool PyUpb_DescriptorPool_CheckNoDatabase (PyObject *_self)
 
static int PyUpb_DescriptorPool_Clear (PyUpb_DescriptorPool *self)
 
static void PyUpb_DescriptorPool_Dealloc (PyUpb_DescriptorPool *self)
 
static PyObject * PyUpb_DescriptorPool_DoAdd (PyObject *_self, PyObject *file_desc)
 
static PyObject * PyUpb_DescriptorPool_DoAddSerializedFile (PyObject *_self, PyObject *serialized_pb)
 
static PyObject * PyUpb_DescriptorPool_DoCreate (PyTypeObject *type, PyObject *db)
 
static PyObject * PyUpb_DescriptorPool_DoCreateWithCache (PyTypeObject *type, PyObject *db, PyUpb_WeakMap *obj_cache)
 
static PyObject * PyUpb_DescriptorPool_FindAllExtensions (PyObject *_self, PyObject *msg_desc)
 
static PyObject * PyUpb_DescriptorPool_FindEnumTypeByName (PyObject *_self, PyObject *arg)
 
static PyObject * PyUpb_DescriptorPool_FindExtensionByName (PyObject *_self, PyObject *arg)
 
static PyObject * PyUpb_DescriptorPool_FindExtensionByNumber (PyObject *_self, PyObject *args)
 
static PyObject * PyUpb_DescriptorPool_FindFieldByName (PyObject *_self, PyObject *arg)
 
static PyObject * PyUpb_DescriptorPool_FindFileByName (PyObject *_self, PyObject *arg)
 
static PyObject * PyUpb_DescriptorPool_FindFileContainingSymbol (PyObject *_self, PyObject *arg)
 
static PyObject * PyUpb_DescriptorPool_FindMessageTypeByName (PyObject *_self, PyObject *arg)
 
static PyObject * PyUpb_DescriptorPool_FindMethodByName (PyObject *_self, PyObject *arg)
 
static PyObject * PyUpb_DescriptorPool_FindOneofByName (PyObject *_self, PyObject *arg)
 
static PyObject * PyUpb_DescriptorPool_FindServiceByName (PyObject *_self, PyObject *arg)
 
PyObject * PyUpb_DescriptorPool_Get (const upb_DefPool *symtab)
 
PyObject * PyUpb_DescriptorPool_GetDefaultPool ()
 
const upb_MessageDefPyUpb_DescriptorPool_GetFileProtoDef (void)
 
upb_DefPoolPyUpb_DescriptorPool_GetSymtab (PyObject *pool)
 
static bool PyUpb_DescriptorPool_LoadDependentFiles (PyUpb_DescriptorPool *self, google_protobuf_FileDescriptorProto *proto)
 
static PyObject * PyUpb_DescriptorPool_New (PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
static const char * PyUpb_DescriptorPool_SplitSymbolName (const char *sym, size_t *parent_size)
 
static int PyUpb_DescriptorPool_Traverse (PyUpb_DescriptorPool *self, visitproc visit, void *arg)
 
static bool PyUpb_DescriptorPool_TryLoadFilename (PyUpb_DescriptorPool *self, PyObject *filename)
 
static bool PyUpb_DescriptorPool_TryLoadFileProto (PyUpb_DescriptorPool *self, PyObject *proto)
 
static bool PyUpb_DescriptorPool_TryLoadSymbol (PyUpb_DescriptorPool *self, PyObject *sym)
 
bool PyUpb_InitDescriptorPool (PyObject *m)
 

Variables

static PyMethodDef PyUpb_DescriptorPool_Methods []
 
static PyType_Slot PyUpb_DescriptorPool_Slots []
 
static PyType_Spec PyUpb_DescriptorPool_Spec
 

Function Documentation

◆ PyUpb_DescriptorPool_Add()

static PyObject* PyUpb_DescriptorPool_Add ( PyObject *  _self,
PyObject *  file_desc 
)
static

Definition at line 291 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_AddSerializedFile()

static PyObject* PyUpb_DescriptorPool_AddSerializedFile ( PyObject *  _self,
PyObject *  serialized_pb 
)
static

Definition at line 278 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_CheckNoDatabase()

bool PyUpb_DescriptorPool_CheckNoDatabase ( PyObject *  _self)

Definition at line 164 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_Clear()

static int PyUpb_DescriptorPool_Clear ( PyUpb_DescriptorPool self)
static

Definition at line 87 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_Dealloc()

static void PyUpb_DescriptorPool_Dealloc ( PyUpb_DescriptorPool self)
static

Definition at line 98 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_DoAdd()

static PyObject * PyUpb_DescriptorPool_DoAdd ( PyObject *  _self,
PyObject *  file_desc 
)
static

Definition at line 250 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_DoAddSerializedFile()

static PyObject* PyUpb_DescriptorPool_DoAddSerializedFile ( PyObject *  _self,
PyObject *  serialized_pb 
)
static

Definition at line 186 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_DoCreate()

static PyObject* PyUpb_DescriptorPool_DoCreate ( PyTypeObject *  type,
PyObject *  db 
)
static

Definition at line 71 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_DoCreateWithCache()

static PyObject* PyUpb_DescriptorPool_DoCreateWithCache ( PyTypeObject *  type,
PyObject *  db,
PyUpb_WeakMap obj_cache 
)
static

Definition at line 61 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindAllExtensions()

static PyObject* PyUpb_DescriptorPool_FindAllExtensions ( PyObject *  _self,
PyObject *  msg_desc 
)
static

Definition at line 568 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindEnumTypeByName()

static PyObject* PyUpb_DescriptorPool_FindEnumTypeByName ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 433 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindExtensionByName()

static PyObject* PyUpb_DescriptorPool_FindExtensionByName ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 335 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindExtensionByNumber()

static PyObject* PyUpb_DescriptorPool_FindExtensionByNumber ( PyObject *  _self,
PyObject *  args 
)
static

Definition at line 550 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindFieldByName()

static PyObject* PyUpb_DescriptorPool_FindFieldByName ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 397 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindFileByName()

static PyObject* PyUpb_DescriptorPool_FindFileByName ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 310 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindFileContainingSymbol()

static PyObject* PyUpb_DescriptorPool_FindFileContainingSymbol ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 530 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindMessageTypeByName()

static PyObject* PyUpb_DescriptorPool_FindMessageTypeByName ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 361 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindMethodByName()

static PyObject* PyUpb_DescriptorPool_FindMethodByName ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 504 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindOneofByName()

static PyObject* PyUpb_DescriptorPool_FindOneofByName ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 458 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_FindServiceByName()

static PyObject* PyUpb_DescriptorPool_FindServiceByName ( PyObject *  _self,
PyObject *  arg 
)
static

Definition at line 485 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_Get()

PyObject* PyUpb_DescriptorPool_Get ( const upb_DefPool symtab)

Definition at line 92 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_GetDefaultPool()

PyObject* PyUpb_DescriptorPool_GetDefaultPool ( )

Definition at line 48 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_GetFileProtoDef()

const upb_MessageDef* PyUpb_DescriptorPool_GetFileProtoDef ( void  )

Definition at line 53 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_GetSymtab()

upb_DefPool* PyUpb_DescriptorPool_GetSymtab ( PyObject *  pool)

Definition at line 77 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_LoadDependentFiles()

static bool PyUpb_DescriptorPool_LoadDependentFiles ( PyUpb_DescriptorPool self,
google_protobuf_FileDescriptorProto proto 
)
static

Definition at line 166 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_New()

static PyObject* PyUpb_DescriptorPool_New ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwargs 
)
static

Definition at line 111 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_SplitSymbolName()

static const char* PyUpb_DescriptorPool_SplitSymbolName ( const char *  sym,
size_t *  parent_size 
)
static

Definition at line 383 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_Traverse()

static int PyUpb_DescriptorPool_Traverse ( PyUpb_DescriptorPool self,
visitproc  visit,
void *  arg 
)
static

Definition at line 81 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_TryLoadFilename()

static bool PyUpb_DescriptorPool_TryLoadFilename ( PyUpb_DescriptorPool self,
PyObject *  filename 
)
static

Definition at line 154 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_TryLoadFileProto()

static bool PyUpb_DescriptorPool_TryLoadFileProto ( PyUpb_DescriptorPool self,
PyObject *  proto 
)
static

Definition at line 127 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_TryLoadSymbol()

static bool PyUpb_DescriptorPool_TryLoadSymbol ( PyUpb_DescriptorPool self,
PyObject *  sym 
)
static

Definition at line 144 of file descriptor_pool.c.

◆ PyUpb_InitDescriptorPool()

bool PyUpb_InitDescriptorPool ( PyObject *  m)

Definition at line 632 of file descriptor_pool.c.

Variable Documentation

◆ PyUpb_DescriptorPool_Methods

PyMethodDef PyUpb_DescriptorPool_Methods[]
static
Initial value:
= {
{"Add", PyUpb_DescriptorPool_Add, METH_O,
"Adds the FileDescriptorProto and its types to this pool."},
{"AddSerializedFile", PyUpb_DescriptorPool_AddSerializedFile, METH_O,
"Adds a serialized FileDescriptorProto to this pool."},
{"FindFileByName", PyUpb_DescriptorPool_FindFileByName, METH_O,
"Searches for a file descriptor by its .proto name."},
{"FindMessageTypeByName", PyUpb_DescriptorPool_FindMessageTypeByName,
METH_O, "Searches for a message descriptor by full name."},
{"FindFieldByName", PyUpb_DescriptorPool_FindFieldByName, METH_O,
"Searches for a field descriptor by full name."},
{"FindExtensionByName", PyUpb_DescriptorPool_FindExtensionByName, METH_O,
"Searches for extension descriptor by full name."},
{"FindEnumTypeByName", PyUpb_DescriptorPool_FindEnumTypeByName, METH_O,
"Searches for enum type descriptor by full name."},
{"FindOneofByName", PyUpb_DescriptorPool_FindOneofByName, METH_O,
"Searches for oneof descriptor by full name."},
{"FindServiceByName", PyUpb_DescriptorPool_FindServiceByName, METH_O,
"Searches for service descriptor by full name."},
{"FindMethodByName", PyUpb_DescriptorPool_FindMethodByName, METH_O,
"Searches for method descriptor by full name."},
{"FindFileContainingSymbol", PyUpb_DescriptorPool_FindFileContainingSymbol,
METH_O, "Gets the FileDescriptor containing the specified symbol."},
{"FindExtensionByNumber", PyUpb_DescriptorPool_FindExtensionByNumber,
METH_VARARGS, "Gets the extension descriptor for the given number."},
{"FindAllExtensions", PyUpb_DescriptorPool_FindAllExtensions, METH_O,
"Gets all known extensions of the given message descriptor."},
{NULL}}

Definition at line 583 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_Slots

PyType_Slot PyUpb_DescriptorPool_Slots[]
static
Initial value:
= {
{Py_tp_dealloc, PyUpb_DescriptorPool_Dealloc},
{Py_tp_methods, PyUpb_DescriptorPool_Methods},
{Py_tp_traverse, PyUpb_DescriptorPool_Traverse},
{0, NULL}}

Definition at line 612 of file descriptor_pool.c.

◆ PyUpb_DescriptorPool_Spec

PyType_Spec PyUpb_DescriptorPool_Spec
static
Initial value:
= {
PYUPB_MODULE_NAME ".DescriptorPool",
0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
}

Definition at line 620 of file descriptor_pool.c.

PyUpb_DescriptorPool
Definition: descriptor_pool.c:42
PyUpb_DescriptorPool_AddSerializedFile
static PyObject * PyUpb_DescriptorPool_AddSerializedFile(PyObject *_self, PyObject *serialized_pb)
Definition: descriptor_pool.c:278
PyUpb_DescriptorPool_Slots
static PyType_Slot PyUpb_DescriptorPool_Slots[]
Definition: descriptor_pool.c:612
PyUpb_DescriptorPool_New
static PyObject * PyUpb_DescriptorPool_New(PyTypeObject *type, PyObject *args, PyObject *kwargs)
Definition: descriptor_pool.c:111
PyUpb_DescriptorPool_FindMessageTypeByName
static PyObject * PyUpb_DescriptorPool_FindMessageTypeByName(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:361
PyUpb_DescriptorPool_FindFieldByName
static PyObject * PyUpb_DescriptorPool_FindFieldByName(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:397
PyUpb_DescriptorPool_FindExtensionByName
static PyObject * PyUpb_DescriptorPool_FindExtensionByName(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:335
PyUpb_DescriptorPool_Add
static PyObject * PyUpb_DescriptorPool_Add(PyObject *_self, PyObject *file_desc)
Definition: descriptor_pool.c:291
PyUpb_DescriptorPool_FindFileByName
static PyObject * PyUpb_DescriptorPool_FindFileByName(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:310
PyUpb_DescriptorPool_FindFileContainingSymbol
static PyObject * PyUpb_DescriptorPool_FindFileContainingSymbol(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:530
PyUpb_DescriptorPool_FindOneofByName
static PyObject * PyUpb_DescriptorPool_FindOneofByName(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:458
PyUpb_DescriptorPool_FindMethodByName
static PyObject * PyUpb_DescriptorPool_FindMethodByName(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:504
PyUpb_DescriptorPool_Dealloc
static void PyUpb_DescriptorPool_Dealloc(PyUpb_DescriptorPool *self)
Definition: descriptor_pool.c:98
PyUpb_DescriptorPool_Clear
static int PyUpb_DescriptorPool_Clear(PyUpb_DescriptorPool *self)
Definition: descriptor_pool.c:87
PyUpb_DescriptorPool_FindAllExtensions
static PyObject * PyUpb_DescriptorPool_FindAllExtensions(PyObject *_self, PyObject *msg_desc)
Definition: descriptor_pool.c:568
PyUpb_DescriptorPool_FindEnumTypeByName
static PyObject * PyUpb_DescriptorPool_FindEnumTypeByName(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:433
PYUPB_MODULE_NAME
#define PYUPB_MODULE_NAME
Definition: upb/python/protobuf.h:43
PyUpb_DescriptorPool_Traverse
static int PyUpb_DescriptorPool_Traverse(PyUpb_DescriptorPool *self, visitproc visit, void *arg)
Definition: descriptor_pool.c:81
PyUpb_DescriptorPool_FindServiceByName
static PyObject * PyUpb_DescriptorPool_FindServiceByName(PyObject *_self, PyObject *arg)
Definition: descriptor_pool.c:485
PyUpb_DescriptorPool_FindExtensionByNumber
static PyObject * PyUpb_DescriptorPool_FindExtensionByNumber(PyObject *_self, PyObject *args)
Definition: descriptor_pool.c:550
PyUpb_DescriptorPool_Methods
static PyMethodDef PyUpb_DescriptorPool_Methods[]
Definition: descriptor_pool.c:583


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