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

Unified Diff: third_party/protobuf/python/google/protobuf/descriptor.py

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/descriptor.py
diff --git a/third_party/protobuf/python/google/protobuf/descriptor.py b/third_party/protobuf/python/google/protobuf/descriptor.py
index 5f613c880b8edb003ef4cdcaab70f4a1e834d4b6..3209b34d57d8da1d45bc9e5a457241603b7d2610 100755
--- a/third_party/protobuf/python/google/protobuf/descriptor.py
+++ b/third_party/protobuf/python/google/protobuf/descriptor.py
@@ -783,6 +783,8 @@ class FileDescriptor(DescriptorBase):
serialized_pb: (str) Byte string of serialized
descriptor_pb2.FileDescriptorProto.
dependencies: List of other FileDescriptors this FileDescriptor depends on.
+ public_dependencies: A list of FileDescriptors, subset of the dependencies
+ above, which were declared as "public".
message_types_by_name: Dict of message names of their descriptors.
enum_types_by_name: Dict of enum names and their descriptors.
extensions_by_name: Dict of extension names and their descriptors.
@@ -794,7 +796,8 @@ class FileDescriptor(DescriptorBase):
_C_DESCRIPTOR_CLASS = _message.FileDescriptor
def __new__(cls, name, package, options=None, serialized_pb=None,
- dependencies=None, syntax=None, pool=None):
+ dependencies=None, public_dependencies=None,
+ syntax=None, pool=None):
# FileDescriptor() is called from various places, not only from generated
# files, to register dynamic proto files and messages.
if serialized_pb:
@@ -805,7 +808,8 @@ class FileDescriptor(DescriptorBase):
return super(FileDescriptor, cls).__new__(cls)
def __init__(self, name, package, options=None, serialized_pb=None,
- dependencies=None, syntax=None, pool=None):
+ dependencies=None, public_dependencies=None,
+ syntax=None, pool=None):
"""Constructor."""
super(FileDescriptor, self).__init__(options, 'FileOptions')
@@ -822,6 +826,7 @@ class FileDescriptor(DescriptorBase):
self.enum_types_by_name = {}
self.extensions_by_name = {}
self.dependencies = (dependencies or [])
+ self.public_dependencies = (public_dependencies or [])
if (api_implementation.Type() == 'cpp' and
self.serialized_pb is not None):
« no previous file with comments | « third_party/protobuf/python/google/protobuf/__init__.py ('k') | third_party/protobuf/python/google/protobuf/descriptor_pb2.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698