Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(955)

Unified Diff: third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h
diff --git a/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h b/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h
index 16bc910c45640ea607bf1e1e5fb29c9bd1d229f1..2a42c11262694451ac0a32fb7b9fafd1ede34392 100644
--- a/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h
+++ b/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h
@@ -42,6 +42,9 @@ class MessageFactory;
namespace python {
+// The (meta) type of all Messages classes.
+struct CMessageClass;
+
// Wraps operations to the global DescriptorPool which contains information
// about all messages and fields.
//
@@ -78,7 +81,7 @@ typedef struct PyDescriptorPool {
//
// Descriptor pointers stored here are owned by the DescriptorPool above.
// Python references to classes are owned by this PyDescriptorPool.
- typedef hash_map<const Descriptor*, PyObject*> ClassesByMessageMap;
+ typedef hash_map<const Descriptor*, CMessageClass*> ClassesByMessageMap;
ClassesByMessageMap* classes_by_descriptor;
// Cache the options for any kind of descriptor.
@@ -101,14 +104,14 @@ const Descriptor* FindMessageTypeByName(PyDescriptorPool* self,
// On error, returns -1 with a Python exception set.
int RegisterMessageClass(PyDescriptorPool* self,
const Descriptor* message_descriptor,
- PyObject* message_class);
+ CMessageClass* message_class);
// Retrieves the Python class registered with the given message descriptor.
//
// Returns a *borrowed* reference if found, otherwise returns NULL with an
// exception set.
-PyObject* GetMessageClass(PyDescriptorPool* self,
- const Descriptor* message_descriptor);
+CMessageClass* GetMessageClass(PyDescriptorPool* self,
+ const Descriptor* message_descriptor);
// The functions below are also exposed as methods of the DescriptorPool type.

Powered by Google App Engine
This is Rietveld 408576698