| Index: third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
|
| diff --git a/third_party/protobuf/python/google/protobuf/pyext/python_protobuf.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
|
| similarity index 62%
|
| rename from third_party/protobuf/python/google/protobuf/pyext/python_protobuf.cc
|
| rename to third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
|
| index 1b1ab5d1dc7f4bf986884718c67d69a460232ada..173541f2073b55d8ebe7bb376fca6acec244a8f1 100644
|
| --- a/third_party/protobuf/python/google/protobuf/pyext/python_protobuf.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
|
| @@ -1,6 +1,6 @@
|
| // Protocol Buffers - Google's data interchange format
|
| -// Copyright 2008 Google Inc. All rights reserved.
|
| -// http://code.google.com/p/protobuf/
|
| +// Copyright 2015 Google Inc. All rights reserved.
|
| +// https://developers.google.com/protocol-buffers/
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -28,36 +28,37 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Author: qrczak@google.com (Marcin Kowalczyk)
|
| +#ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_MAP_FIELD_H__
|
| +#define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_MAP_FIELD_H__
|
|
|
| -#include <google/protobuf/pyext/python_protobuf.h>
|
| +#include <map>
|
| +#include <string>
|
| +#include <google/protobuf/compiler/objectivec/objectivec_field.h>
|
|
|
| namespace google {
|
| namespace protobuf {
|
| -namespace python {
|
| -
|
| -static const Message* GetCProtoInsidePyProtoStub(PyObject* msg) {
|
| - return NULL;
|
| -}
|
| -static Message* MutableCProtoInsidePyProtoStub(PyObject* msg) {
|
| - return NULL;
|
| -}
|
| -
|
| -// This is initialized with a default, stub implementation.
|
| -// If python-google.protobuf.cc is loaded, the function pointer is overridden
|
| -// with a full implementation.
|
| -const Message* (*GetCProtoInsidePyProtoPtr)(PyObject* msg) =
|
| - GetCProtoInsidePyProtoStub;
|
| -Message* (*MutableCProtoInsidePyProtoPtr)(PyObject* msg) =
|
| - MutableCProtoInsidePyProtoStub;
|
| -
|
| -const Message* GetCProtoInsidePyProto(PyObject* msg) {
|
| - return GetCProtoInsidePyProtoPtr(msg);
|
| -}
|
| -Message* MutableCProtoInsidePyProto(PyObject* msg) {
|
| - return MutableCProtoInsidePyProtoPtr(msg);
|
| -}
|
| -
|
| -} // namespace python
|
| +namespace compiler {
|
| +namespace objectivec {
|
| +
|
| +class MapFieldGenerator : public RepeatedFieldGenerator {
|
| + friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field);
|
| +
|
| + public:
|
| + virtual void FinishInitialization(void);
|
| + virtual void GenerateFieldDescriptionTypeSpecific(io::Printer* printer) const;
|
| +
|
| + protected:
|
| + explicit MapFieldGenerator(const FieldDescriptor* descriptor);
|
| + virtual ~MapFieldGenerator();
|
| +
|
| + private:
|
| + scoped_ptr<FieldGenerator> value_field_generator_;
|
| + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator);
|
| +};
|
| +
|
| +} // namespace objectivec
|
| +} // namespace compiler
|
| } // namespace protobuf
|
| } // namespace google
|
| +
|
| +#endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_MAP_FIELD_H__
|
|
|