Home | History | Annotate | Download | only in pyext

Lines Matching refs:CMessage

410 namespace cmessage {
412 CMessage* self,
415 } // namespace cmessage
418 // Visiting the composite children of a CMessage
432 int VisitCMessage(CMessage* cmessage,
464 CMessage* cmsg = reinterpret_cast<CMessage*>(child);
473 // Visit each composite field and extension field of this CMessage.
476 int ForEachCompositeField(CMessage* self, Visitor visitor) {
505 const FieldDescriptor* descriptor = cmessage::GetExtensionDescriptor(key);
753 namespace cmessage {
755 PyDescriptorPool* GetDescriptorPoolForMessage(CMessage* message) {
756 // No need to check the type: the type of instances of CMessage is always
762 MessageFactory* GetFactoryForMessage(CMessage* message) {
767 CMessage* cmessage,
770 Message* message = cmessage->message;
787 PyObject* child_message = cmessage->composite_fields ?
788 PyDict_GetItemString(cmessage->composite_fields, field_name) : NULL;
795 cmessage, existing_field, child_message) < 0) {
798 return PyDict_DelItemString(cmessage->composite_fields, field_name);
808 CMessage* parent,
843 int AssureWritable(CMessage* self) {
873 // When a CMessage is made writable its Message pointer is updated
875 // update any references to the old, read-only CMessage. There are
893 CMessage* self, PyObject* name) {
954 CMessage* self,
1029 CMessage* last_cmessage = reinterpret_cast<CMessage*>(
1044 int InitAttributes(CMessage* self, PyObject* kwargs) {
1120 reinterpret_cast<CMessage*>(new_msg.get()), next.get()));
1168 CMessage* cmessage = reinterpret_cast<CMessage*>(message.get());
1170 if (InitAttributes(cmessage, value) < 0) {
1174 ScopedPyObjectPtr merged(MergeFrom(cmessage, value));
1198 CMessage* NewEmptyMessage(CMessageClass* type) {
1199 CMessage* self = reinterpret_cast<CMessage*>(
1236 CMessage* self = NewEmptyMessage(type);
1247 static int Init(CMessage* self, PyObject* args, PyObject* kwargs) {
1257 // Deallocating a CMessage
1259 // Deallocating a CMessage requires that we clear any weak references
1270 CMessage* child_cmessage = reinterpret_cast<CMessage*>(
1287 int VisitCMessage(CMessage* cmessage,
1289 cmessage->parent = NULL;
1294 static void Dealloc(CMessage* self) {
1310 PyObject* IsInitialized(CMessage* self, PyObject* args) {
1341 CMessage* self, const FieldDescriptor* field_descriptor) {
1410 PyObject* HasField(CMessage* self, PyObject* arg) {
1461 PyObject* ClearExtension(CMessage* self, PyObject* extension) {
1476 CMessage* self, PyObject* extension) {
1494 // When a CMessage field is cleared we need to:
1496 // * Release the Message used as the backing store for the CMessage
1499 // * Change the owner field of the released CMessage and all of its
1502 // * Clear the weak references from the released CMessage to the
1510 // * Change the owner field of all the released CMessage and all of
1536 int VisitCMessage(CMessage* cmessage,
1538 return SetOwner(cmessage, new_owner_);
1545 // Change the owner of this CMessage and all its children, recursively.
1546 int SetOwner(CMessage* self, const shared_ptr<Message>& new_owner) {
1556 Message* ReleaseMessage(CMessage* self,
1575 int ReleaseSubMessage(CMessage* self,
1577 CMessage* child_cmessage) {
1592 explicit ReleaseChild(CMessage* parent) :
1609 int VisitCMessage(CMessage* cmessage,
1612 reinterpret_cast<CMessage*>(cmessage));
1615 CMessage* parent_;
1619 CMessage* self,
1629 CMessage* self,
1639 PyObject* ClearField(CMessage* self, PyObject* arg) {
1694 PyObject* Clear(CMessage* self) {
1708 static string GetMessageName(CMessage* self) {
1716 static PyObject* SerializeToString(CMessage* self, PyObject* args) {
1769 static PyObject* SerializePartialToString(CMessage* self) {
1813 static PyObject* ToStr(CMessage* self) {
1826 PyObject* MergeFrom(CMessage* self, PyObject* arg) {
1827 CMessage* other_message;
1837 other_message = reinterpret_cast<CMessage*>(arg);
1858 static PyObject* CopyFrom(CMessage* self, PyObject* arg) {
1859 CMessage* other_message;
1869 other_message = reinterpret_cast<CMessage*>(arg);
1920 static PyObject* MergeFromString(CMessage* self, PyObject* arg) {
1944 CMessage* self, PyObject* arg) {
1951 static PyObject* ByteSize(CMessage* self, PyObject* args) {
2051 static PyObject* SetInParent(CMessage* self, PyObject* args) {
2056 static PyObject* WhichOneof(CMessage* self, PyObject* arg) {
2081 static PyObject* GetExtensionDict(CMessage* self, void *closure);
2083 static PyObject* ListFields(CMessage* self) {
2167 static PyObject* DiscardUnknownFields(CMessage* self) {
2173 PyObject* FindInitializationErrors(CMessage* self) {
2195 static PyObject* RichCompare(CMessage* self, PyObject* other, int opid) {
2207 reinterpret_cast<CMessage*>(other)->message;
2216 *reinterpret_cast<CMessage*>(other)->message)) {
2310 CMessage* self, const FieldDescriptor* field_descriptor) {
2322 CMessage* cmsg = cmessage::NewEmptyMessage(message_class);
2417 CMessage* self,
2437 CMessage* cmsg = reinterpret_cast<CMessage*>(py_cmsg);
2448 PyObject* DeepCopy(CMessage* self, PyObject* arg) {
2459 reinterpret_cast<CMessage*>(clone),
2467 PyObject* ToUnicode(CMessage* self) {
2496 PyObject* Reduce(CMessage* self) {
2517 PyObject* SetState(CMessage* self, PyObject* state) {
2532 // CMessage static methods:
2544 static PyObject* GetExtensionDict(CMessage* self, void *closure) {
2633 CMessage* self, PyObject* name, PyObject* value) {
2643 PyObject* GetAttr(CMessage* self, PyObject* name) {
2721 int SetAttr(CMessage* self, PyObject* name, PyObject* value) {
2754 } // namespace cmessage
2758 FULL_MODULE_NAME ".CMessage", // tp_name
2759 sizeof(CMessage), // tp_basicsize
2761 (destructor)cmessage::Dealloc, // tp_dealloc
2766 (reprfunc)cmessage::ToStr, // tp_repr
2772 (reprfunc)cmessage::ToStr, // tp_str
2773 (getattrofunc)cmessage::GetAttr, // tp_getattro
2774 (setattrofunc)cmessage::SetAttr, // tp_setattro
2780 (richcmpfunc)cmessage::RichCompare, // tp_richcompare
2784 cmessage::Methods, // tp_methods
2786 cmessage::Getters, // tp_getset
2792 (initproc)cmessage::Init, // tp_init
2794 cmessage::New, // tp_new
2806 CMessage* cmsg = reinterpret_cast<CMessage*>(msg);
2814 CMessage* cmsg = reinterpret_cast<CMessage*>(msg);
2819 // the underlying C++ message back to the CMessage (e.g. removed repeated
2821 // C++ message if there is no child data in the CMessage.
2824 cmessage::AssureWritable(cmsg);
3086 (PyCFunction)google::protobuf::python::cmessage::SetAllowOversizeProtos,