diff options
author | 2009-04-25 02:53:47 +0000 | |
---|---|---|
committer | 2009-04-25 02:53:47 +0000 | |
commit | d37d46dfbcedadeb439ad0367f8afcf8867dca43 (patch) | |
tree | b896df229f7c671637924c156d5a759ba50a3190 /python/google/protobuf/reflection.py | |
parent | 709ea28f3264aa5632e5577a4080671173fc6166 (diff) |
Integrate recent changes from Google-internal code tree. See CHANGES.txt
for details.
Diffstat (limited to 'python/google/protobuf/reflection.py')
-rwxr-xr-x | python/google/protobuf/reflection.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/google/protobuf/reflection.py b/python/google/protobuf/reflection.py index f345067a..5ab7a1b1 100755 --- a/python/google/protobuf/reflection.py +++ b/python/google/protobuf/reflection.py @@ -599,6 +599,10 @@ def _AddHasExtensionMethod(cls): def _AddEqualsMethod(message_descriptor, cls): """Helper for _AddMessageMethods().""" def __eq__(self, other): + if (not isinstance(other, message_mod.Message) or + other.DESCRIPTOR != self.DESCRIPTOR): + return False + if self is other: return True |