Classes | Namespaces | Macros | Functions | Variables
protobuf/python/google/protobuf/pyext/message.cc File Reference
#include <google/protobuf/pyext/message.h>
#include <structmember.h>
#include <cstdint>
#include <map>
#include <memory>
#include <string>
#include <vector>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/message.h>
#include <google/protobuf/text_format.h>
#include <google/protobuf/unknown_field_set.h>
#include <google/protobuf/pyext/descriptor.h>
#include <google/protobuf/pyext/descriptor_pool.h>
#include <google/protobuf/pyext/extension_dict.h>
#include <google/protobuf/pyext/field.h>
#include <google/protobuf/pyext/map_container.h>
#include <google/protobuf/pyext/message_factory.h>
#include <google/protobuf/pyext/repeated_composite_container.h>
#include <google/protobuf/pyext/repeated_scalar_container.h>
#include <google/protobuf/pyext/safe_numerics.h>
#include <google/protobuf/pyext/scoped_pyobject_ptr.h>
#include <google/protobuf/pyext/unknown_fields.h>
#include <google/protobuf/util/message_differencer.h>
#include <google/protobuf/io/strtod.h>
#include <google/protobuf/stubs/map_util.h>
#include <google/protobuf/port_def.inc>
Include dependency graph for protobuf/python/google/protobuf/pyext/message.cc:

Go to the source code of this file.

Classes

class  google::protobuf::python::MessageReflectionFriend
 
class  google::protobuf::python::cmessage::PythonFieldValuePrinter
 

Namespaces

 google
 
 google::protobuf
 
 google::protobuf::python
 
 google::protobuf::python::cmessage
 
 google::protobuf::python::message_meta
 

Macros

#define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
 
#define PyString_AsString(ob)   (PyUnicode_Check(ob) ? PyUnicode_AsUTF8(ob) : PyBytes_AsString(ob))
 
#define PyString_AsStringAndSize(ob, charpp, sizep)
 
#define PyVarObject_HEAD_INIT(type, size)   PyObject_HEAD_INIT(type) size,
 

Functions

PyObject * google::protobuf::python::cmessage::_CheckCalledFromGeneratedFile (PyObject *unused, PyObject *unused_arg)
 
static int google::protobuf::python::message_meta::AddDescriptors (PyObject *cls, const Descriptor *descriptor)
 
bool google::protobuf::python::AllowInvalidUTF8 (const FieldDescriptor *field)
 
int google::protobuf::python::cmessage::AssureWritable (CMessage *self)
 
static PyObject * google::protobuf::python::cmessage::ByteSize (CMessage *self, PyObject *args)
 
bool google::protobuf::python::CheckAndGetBool (PyObject *arg, bool *value)
 
bool google::protobuf::python::CheckAndGetDouble (PyObject *arg, double *value)
 
bool google::protobuf::python::CheckAndGetFloat (PyObject *arg, float *value)
 
template<class T >
bool google::protobuf::python::CheckAndGetInteger (PyObject *arg, T *value)
 
template bool google::protobuf::python::CheckAndGetInteger< int32 > (PyObject *, int32 *)
 
template bool google::protobuf::python::CheckAndGetInteger< int64 > (PyObject *, int64 *)
 
template bool google::protobuf::python::CheckAndGetInteger< uint32 > (PyObject *, uint32 *)
 
template bool google::protobuf::python::CheckAndGetInteger< uint64 > (PyObject *, uint64 *)
 
bool google::protobuf::python::CheckAndSetString (PyObject *arg, Message *message, const FieldDescriptor *descriptor, const Reflection *reflection, bool append, int index)
 
bool google::protobuf::python::CheckFieldBelongsToMessage (const FieldDescriptor *field_descriptor, const Message *message)
 
bool google::protobuf::python::cmessage::CheckHasPresence (const FieldDescriptor *field_descriptor, bool in_oneof)
 
static CMessageClass * google::protobuf::python::CheckMessageClass (PyTypeObject *cls)
 
PyObject * google::protobuf::python::CheckString (PyObject *arg, const FieldDescriptor *descriptor)
 
PyObject * google::protobuf::python::cmessage::Clear (CMessage *self)
 
PyObject * google::protobuf::python::cmessage::ClearExtension (CMessage *self, PyObject *extension)
 
PyObject * google::protobuf::python::cmessage::ClearField (CMessage *self, PyObject *arg)
 
int google::protobuf::python::cmessage::ClearFieldByDescriptor (CMessage *self, const FieldDescriptor *field_descriptor)
 
static PyObject * google::protobuf::python::cmessage::CopyFrom (CMessage *self, PyObject *arg)
 
static void google::protobuf::python::cmessage::Dealloc (CMessage *self)
 
static void google::protobuf::python::message_meta::Dealloc (PyObject *pself)
 
PyObject * google::protobuf::python::cmessage::DeepCopy (CMessage *self, PyObject *arg)
 
int google::protobuf::python::cmessage::DeleteRepeatedField (CMessage *self, const FieldDescriptor *field_descriptor, PyObject *slice)
 
static PyObject * google::protobuf::python::cmessage::DiscardUnknownFields (CMessage *self)
 
const FieldDescriptorgoogle::protobuf::python::cmessage::FindFieldWithOneofs (const Message *message, ConstStringParam field_name, bool *in_oneof)
 
PyObject * google::protobuf::python::cmessage::FindInitializationErrors (CMessage *self)
 
int google::protobuf::python::cmessage::FixupMessageAfterMerge (CMessage *self)
 
void google::protobuf::python::FormatTypeError (PyObject *arg, const char *expected_types)
 
PyObject * google::protobuf::python::cmessage::FromString (PyTypeObject *cls, PyObject *serialized)
 
static int google::protobuf::python::message_meta::GcClear (PyObject *pself)
 
static int google::protobuf::python::message_meta::GcTraverse (PyObject *pself, visitproc visit, void *arg)
 
static PyObject * google::protobuf::python::message_meta::GetAttr (CMessageClass *self, PyObject *name)
 
PyObject * google::protobuf::python::cmessage::GetAttr (PyObject *pself, PyObject *name)
 
static PyObject * google::protobuf::python::message_meta::GetClassAttribute (CMessageClass *self, PyObject *name)
 
static const Messagegoogle::protobuf::python::GetCProtoInsidePyProtoImpl (PyObject *msg)
 
const FieldDescriptorgoogle::protobuf::python::cmessage::GetExtensionDescriptor (PyObject *extension)
 
static PyObject * google::protobuf::python::cmessage::GetExtensionDict (CMessage *self, void *closure)
 
static PyObject * google::protobuf::python::cmessage::GetExtensionsByName (CMessage *self, void *closure)
 
static PyObject * google::protobuf::python::message_meta::GetExtensionsByName (CMessageClass *self, void *closure)
 
static PyObject * google::protobuf::python::cmessage::GetExtensionsByNumber (CMessage *self, void *closure)
 
static PyObject * google::protobuf::python::message_meta::GetExtensionsByNumber (CMessageClass *self, void *closure)
 
PyMessageFactory * google::protobuf::python::cmessage::GetFactoryForMessage (CMessage *message)
 
PyObject * google::protobuf::python::cmessage::GetFieldValue (CMessage *self, const FieldDescriptor *field_descriptor)
 
static PyObject * google::protobuf::python::cmessage::GetIntegerEnumValue (const FieldDescriptor &descriptor, PyObject *value)
 
static CMessageClass * google::protobuf::python::GetMessageClassFromDescriptor (const Descriptor *descriptor, PyObject *py_message_factory)
 
static const Descriptorgoogle::protobuf::python::GetMessageDescriptor (PyTypeObject *cls)
 
static std::string google::protobuf::python::cmessage::GetMessageName (CMessage *self)
 
PyObject * google::protobuf::python::cmessage::HasExtension (CMessage *self, PyObject *extension)
 
PyObject * google::protobuf::python::cmessage::HasField (CMessage *self, PyObject *arg)
 
int google::protobuf::python::cmessage::HasFieldByDescriptor (CMessage *self, const FieldDescriptor *field_descriptor)
 
static int google::protobuf::python::cmessage::Init (CMessage *self, PyObject *args, PyObject *kwargs)
 
int google::protobuf::python::cmessage::InitAttributes (CMessage *self, PyObject *args, PyObject *kwargs)
 
void google::protobuf::python::InitGlobals ()
 
bool google::protobuf::python::InitProto2MessageModule (PyObject *m)
 
PyObject * google::protobuf::python::cmessage::InternalGetScalar (const Message *message, const FieldDescriptor *field_descriptor)
 
CMessage * google::protobuf::python::cmessage::InternalGetSubMessage (CMessage *self, const FieldDescriptor *field_descriptor)
 
int google::protobuf::python::cmessage::InternalReleaseFieldByDescriptor (CMessage *self, const FieldDescriptor *field_descriptor)
 
static int google::protobuf::python::cmessage::InternalReparentFields (CMessage *self, const std::vector< CMessage * > &messages_to_release, const std::vector< ContainerBase * > &containers_to_release)
 
static PyObject * google::protobuf::python::cmessage::InternalSerializeToString (CMessage *self, PyObject *args, PyObject *kwargs, bool require_initialized)
 
int google::protobuf::python::cmessage::InternalSetNonOneofScalar (Message *message, const FieldDescriptor *field_descriptor, PyObject *arg)
 
int google::protobuf::python::cmessage::InternalSetScalar (CMessage *self, const FieldDescriptor *field_descriptor, PyObject *arg)
 
PyObject * google::protobuf::python::cmessage::IsInitialized (CMessage *self, PyObject *args)
 
bool google::protobuf::python::IsValidUTF8 (PyObject *obj)
 
static PyObject * google::protobuf::python::cmessage::ListFields (CMessage *self)
 
static int google::protobuf::python::cmessage::MaybeReleaseOverlappingOneofField (CMessage *cmessage, const FieldDescriptor *field)
 
PyObject * google::protobuf::python::cmessage::MergeFrom (CMessage *self, PyObject *arg)
 
static PyObject * google::protobuf::python::cmessage::MergeFromString (CMessage *self, PyObject *arg)
 
static Messagegoogle::protobuf::python::MutableCProtoInsidePyProtoImpl (PyObject *msg)
 
static PyObject * google::protobuf::python::cmessage::New (PyTypeObject *cls, PyObject *unused_args, PyObject *unused_kwargs)
 
static PyObject * google::protobuf::python::message_meta::New (PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
static CMessage * google::protobuf::python::cmessage::NewCMessage (CMessageClass *type)
 
CMessage * google::protobuf::python::cmessage::NewEmptyMessage (CMessageClass *type)
 
void google::protobuf::python::OutOfRangeError (PyObject *arg)
 
static PyObject * google::protobuf::python::cmessage::ParseFromString (CMessage *self, PyObject *arg)
 
const Messagegoogle::protobuf::python::PyMessage_GetMessagePointer (PyObject *msg)
 
Messagegoogle::protobuf::python::PyMessage_GetMutableMessagePointer (PyObject *msg)
 
PyObject * google::protobuf::python::PyMessage_New (const Descriptor *descriptor, PyObject *py_message_factory)
 
PyObject * google::protobuf::python::PyMessage_NewMessageOwnedExternally (Message *message, PyObject *message_factory)
 
PyObject * google::protobuf::python::cmessage::RegisterExtension (PyObject *cls, PyObject *extension_handle)
 
static PyObject * google::protobuf::python::cmessage::RichCompare (CMessage *self, PyObject *other, int opid)
 
static PyObject * google::protobuf::python::cmessage::SerializePartialToString (CMessage *self, PyObject *args, PyObject *kwargs)
 
static PyObject * google::protobuf::python::cmessage::SerializeToString (CMessage *self, PyObject *args, PyObject *kwargs)
 
PyObject * google::protobuf::python::cmessage::SetAllowOversizeProtos (PyObject *m, PyObject *arg)
 
bool google::protobuf::python::cmessage::SetCompositeField (CMessage *self, const FieldDescriptor *field, ContainerBase *value)
 
int google::protobuf::python::cmessage::SetFieldValue (CMessage *self, const FieldDescriptor *field_descriptor, PyObject *value)
 
static PyObject * google::protobuf::python::cmessage::SetInParent (CMessage *self, PyObject *args)
 
bool google::protobuf::python::cmessage::SetSubmessage (CMessage *self, CMessage *submessage)
 
static PyObject * google::protobuf::python::cmessage::ToStr (CMessage *self)
 
PyObject * google::protobuf::python::ToStringObject (const FieldDescriptor *descriptor, const std::string &value)
 
PyObject * google::protobuf::python::cmessage::ToUnicode (CMessage *self)
 
static PyObject * google::protobuf::python::cmessage::UnknownFieldSet (CMessage *self)
 
template<class RangeType , class ValueType >
bool google::protobuf::python::VerifyIntegerCastAndRange (PyObject *arg, ValueType value)
 
static PyObject * google::protobuf::python::cmessage::WhichOneof (CMessage *self, PyObject *arg)
 

Variables

static CMessageClass google::protobuf::python::_CMessage_Type
 
static PyTypeObject google::protobuf::python::_CMessageClass_Type
 
static bool google::protobuf::python::allow_oversize_protos = false
 
static PyGetSetDef google::protobuf::python::message_meta::Getters []
 
static PyGetSetDef google::protobuf::python::cmessage::Getters []
 
static PyObject * google::protobuf::python::kDESCRIPTOR
 
static PyObject * google::protobuf::python::kEmptyWeakref
 
static PyMethodDef google::protobuf::python::cmessage::Methods []
 
static PyObject * google::protobuf::python::PythonMessage_class
 
static PyObject * google::protobuf::python::WKT_classes = NULL
 

Macro Definition Documentation

◆ Py_TYPE

#define Py_TYPE (   ob)    (((PyObject*)(ob))->ob_type)

◆ PyString_AsString

#define PyString_AsString (   ob)    (PyUnicode_Check(ob) ? PyUnicode_AsUTF8(ob) : PyBytes_AsString(ob))

◆ PyString_AsStringAndSize

#define PyString_AsStringAndSize (   ob,
  charpp,
  sizep 
)
Value:
(PyUnicode_Check(ob) ? ((*(charpp) = const_cast<char*>( \
PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL \
? -1 \
: 0) \
: PyBytes_AsStringAndSize(ob, (charpp), (sizep)))

Definition at line 82 of file protobuf/python/google/protobuf/pyext/message.cc.

◆ PyVarObject_HEAD_INIT

#define PyVarObject_HEAD_INIT (   type,
  size 
)    PyObject_HEAD_INIT(type) size,


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