Fix copybara transformations for Python/C++ code.

PiperOrigin-RevId: 492014560
pull/11100/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent 09a08d1f75
commit 129c3a4697
  1. 2
      python/google/protobuf/internal/python_protobuf.cc
  2. 6
      python/google/protobuf/proto_api.h
  3. 12
      python/google/protobuf/pyext/descriptor.cc
  4. 6
      python/google/protobuf/pyext/descriptor.h
  5. 8
      python/google/protobuf/pyext/descriptor_containers.cc
  6. 6
      python/google/protobuf/pyext/descriptor_containers.h
  7. 6
      python/google/protobuf/pyext/descriptor_database.cc
  8. 6
      python/google/protobuf/pyext/descriptor_database.h
  9. 12
      python/google/protobuf/pyext/descriptor_pool.cc
  10. 6
      python/google/protobuf/pyext/descriptor_pool.h
  11. 14
      python/google/protobuf/pyext/extension_dict.cc
  12. 8
      python/google/protobuf/pyext/extension_dict.h
  13. 6
      python/google/protobuf/pyext/field.cc
  14. 6
      python/google/protobuf/pyext/field.h
  15. 10
      python/google/protobuf/pyext/map_container.cc
  16. 8
      python/google/protobuf/pyext/map_container.h
  17. 26
      python/google/protobuf/pyext/message.cc
  18. 6
      python/google/protobuf/pyext/message.h
  19. 8
      python/google/protobuf/pyext/message_factory.cc
  20. 8
      python/google/protobuf/pyext/message_factory.h
  21. 10
      python/google/protobuf/pyext/message_module.cc
  22. 12
      python/google/protobuf/pyext/repeated_composite_container.cc
  23. 8
      python/google/protobuf/pyext/repeated_composite_container.h
  24. 10
      python/google/protobuf/pyext/repeated_scalar_container.cc
  25. 8
      python/google/protobuf/pyext/repeated_scalar_container.h
  26. 6
      python/google/protobuf/pyext/safe_numerics.h
  27. 6
      python/google/protobuf/pyext/scoped_pyobject_ptr.h
  28. 6
      python/google/protobuf/pyext/unknown_field_set.cc
  29. 8
      python/google/protobuf/pyext/unknown_field_set.h
  30. 6
      python/google/protobuf/pyext/unknown_fields.cc
  31. 8
      python/google/protobuf/pyext/unknown_fields.h
  32. 6
      python/google/protobuf/python_protobuf.h

@ -30,7 +30,7 @@
// Author: qrczak@google.com (Marcin Kowalczyk)
#include "third_party/py/google/protobuf/python_protobuf.h"
#include "google/protobuf/python_protobuf.h"
namespace google {
namespace protobuf {

@ -42,8 +42,8 @@
// Then use the methods of the returned class:
// py_proto_api->GetMessagePointer(...);
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_PROTO_API_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_PROTO_API_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_PROTO_API_H__
#define GOOGLE_PROTOBUF_PYTHON_PROTO_API_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -141,4 +141,4 @@ inline const char* PyProtoAPICapsuleName() {
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_PROTO_API_H__
#endif // GOOGLE_PROTOBUF_PYTHON_PROTO_API_H__

@ -30,7 +30,7 @@
// Author: petar@google.com (Petar Petrov)
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/descriptor.h"
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -42,11 +42,11 @@
#include "google/protobuf/descriptor.pb.h"
#include "google/protobuf/dynamic_message.h"
#include "third_party/py/google/protobuf/pyext/descriptor_containers.h"
#include "third_party/py/google/protobuf/pyext/descriptor_pool.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/message_factory.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/descriptor_containers.h"
#include "google/protobuf/pyext/descriptor_pool.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message_factory.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "absl/strings/string_view.h"
#include "google/protobuf/io/coded_stream.h"

@ -30,8 +30,8 @@
// Author: petar@google.com (Petar Petrov)
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -102,4 +102,4 @@ bool InitDescriptor();
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_H__

@ -56,13 +56,13 @@
#include <string>
#include "third_party/py/google/protobuf/pyext/descriptor_containers.h"
#include "google/protobuf/pyext/descriptor_containers.h"
// clang-format on
#include "google/protobuf/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor_pool.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/descriptor_pool.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "absl/strings/string_view.h"
#define PyString_AsStringAndSize(ob, charpp, sizep) \

@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_CONTAINERS_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_CONTAINERS_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_CONTAINERS_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_CONTAINERS_H__
// Mappings and Sequences of descriptors.
// They implement containers like fields_by_name, EnumDescriptor.values...
@ -107,4 +107,4 @@ PyObject* NewServiceMethodsByName(const ServiceDescriptor* descriptor);
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_CONTAINERS_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_CONTAINERS_H__

@ -31,7 +31,7 @@
// This file defines a C++ DescriptorDatabase, which wraps a Python Database
// and delegate all its operations to Python methods.
#include "third_party/py/google/protobuf/pyext/descriptor_database.h"
#include "google/protobuf/pyext/descriptor_database.h"
#include <cstdint>
#include <string>
@ -40,8 +40,8 @@
#include "google/protobuf/stubs/logging.h"
#include "google/protobuf/stubs/common.h"
#include "google/protobuf/descriptor.pb.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
namespace google {
namespace protobuf {

@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_DATABASE_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_DATABASE_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_DATABASE_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_DATABASE_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -83,4 +83,4 @@ class PyDescriptorDatabase : public DescriptorDatabase {
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_DATABASE_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_DATABASE_H__

@ -39,12 +39,12 @@
#include <Python.h>
#include "google/protobuf/descriptor.pb.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor_database.h"
#include "third_party/py/google/protobuf/pyext/descriptor_pool.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/message_factory.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/descriptor_database.h"
#include "google/protobuf/pyext/descriptor_pool.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message_factory.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "absl/strings/string_view.h"
#include "absl/strings/str_replace.h"

@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_POOL_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_POOL_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_POOL_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_POOL_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -146,4 +146,4 @@ bool InitDescriptorPool();
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_POOL_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_DESCRIPTOR_POOL_H__

@ -31,7 +31,7 @@
// Author: anuraag@google.com (Anuraag Agrawal)
// Author: tibell@google.com (Johan Tibell)
#include "third_party/py/google/protobuf/pyext/extension_dict.h"
#include "google/protobuf/pyext/extension_dict.h"
#include <cstdint>
#include <memory>
@ -43,12 +43,12 @@
#include "google/protobuf/descriptor.h"
#include "google/protobuf/dynamic_message.h"
#include "google/protobuf/message.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/message_factory.h"
#include "third_party/py/google/protobuf/pyext/repeated_composite_container.h"
#include "third_party/py/google/protobuf/pyext/repeated_scalar_container.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message_factory.h"
#include "google/protobuf/pyext/repeated_composite_container.h"
#include "google/protobuf/pyext/repeated_scalar_container.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "absl/strings/string_view.h"
#define PyString_AsStringAndSize(ob, charpp, sizep) \

@ -31,13 +31,13 @@
// Author: anuraag@google.com (Anuraag Agrawal)
// Author: tibell@google.com (Johan Tibell)
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_EXTENSION_DICT_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_EXTENSION_DICT_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_EXTENSION_DICT_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_EXTENSION_DICT_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "third_party/py/google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message.h"
namespace google {
namespace protobuf {
@ -67,4 +67,4 @@ ExtensionDict* NewExtensionDict(CMessage *parent);
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_EXTENSION_DICT_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_EXTENSION_DICT_H__

@ -28,11 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "third_party/py/google/protobuf/pyext/field.h"
#include "google/protobuf/pyext/field.h"
#include "google/protobuf/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/message.h"
namespace google {
namespace protobuf {

@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_FIELD_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_FIELD_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_FIELD_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_FIELD_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -57,4 +57,4 @@ PyObject* NewFieldProperty(const FieldDescriptor* field_descriptor);
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_FIELD_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_FIELD_H__

@ -30,7 +30,7 @@
// Author: haberman@google.com (Josh Haberman)
#include "third_party/py/google/protobuf/pyext/map_container.h"
#include "google/protobuf/pyext/map_container.h"
#include <cstdint>
#include <memory>
@ -41,10 +41,10 @@
#include "google/protobuf/map.h"
#include "google/protobuf/map_field.h"
#include "google/protobuf/message.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/message_factory.h"
#include "third_party/py/google/protobuf/pyext/repeated_composite_container.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message_factory.h"
#include "google/protobuf/pyext/repeated_composite_container.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
namespace google {
namespace protobuf {

@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MAP_CONTAINER_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MAP_CONTAINER_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_MAP_CONTAINER_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_MAP_CONTAINER_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -38,7 +38,7 @@
#include "google/protobuf/descriptor.h"
#include "google/protobuf/message.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message.h"
namespace google {
namespace protobuf {
@ -86,4 +86,4 @@ extern MessageMapContainer* NewMessageMapContainer(
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MAP_CONTAINER_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_MAP_CONTAINER_H__

@ -31,7 +31,7 @@
// Author: anuraag@google.com (Anuraag Agrawal)
// Author: tibell@google.com (Johan Tibell)
#include "third_party/py/google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message.h"
#include <structmember.h> // A Python header file.
@ -57,18 +57,18 @@
#include "google/protobuf/message.h"
#include "google/protobuf/text_format.h"
#include "google/protobuf/unknown_field_set.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor_pool.h"
#include "third_party/py/google/protobuf/pyext/extension_dict.h"
#include "third_party/py/google/protobuf/pyext/field.h"
#include "third_party/py/google/protobuf/pyext/map_container.h"
#include "third_party/py/google/protobuf/pyext/message_factory.h"
#include "third_party/py/google/protobuf/pyext/repeated_composite_container.h"
#include "third_party/py/google/protobuf/pyext/repeated_scalar_container.h"
#include "third_party/py/google/protobuf/pyext/safe_numerics.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "third_party/py/google/protobuf/pyext/unknown_field_set.h"
#include "third_party/py/google/protobuf/pyext/unknown_fields.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/descriptor_pool.h"
#include "google/protobuf/pyext/extension_dict.h"
#include "google/protobuf/pyext/field.h"
#include "google/protobuf/pyext/map_container.h"
#include "google/protobuf/pyext/message_factory.h"
#include "google/protobuf/pyext/repeated_composite_container.h"
#include "google/protobuf/pyext/repeated_scalar_container.h"
#include "google/protobuf/pyext/safe_numerics.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/unknown_field_set.h"
#include "google/protobuf/pyext/unknown_fields.h"
#include "google/protobuf/util/message_differencer.h"
#include "absl/strings/string_view.h"
#include "google/protobuf/io/coded_stream.h"

@ -31,8 +31,8 @@
// Author: anuraag@google.com (Anuraag Agrawal)
// Author: tibell@google.com (Johan Tibell)
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -374,4 +374,4 @@ extern template bool CheckAndGetInteger<uint64>(PyObject*, uint64*);
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_H__

@ -35,10 +35,10 @@
#include <Python.h>
#include "google/protobuf/dynamic_message.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/message_factory.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message_factory.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#define PyString_AsStringAndSize(ob, charpp, sizep) \
(PyUnicode_Check(ob) \

@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_FACTORY_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_FACTORY_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_FACTORY_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_FACTORY_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <unordered_map>
#include "google/protobuf/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor_pool.h"
#include "google/protobuf/pyext/descriptor_pool.h"
namespace google {
namespace protobuf {
@ -101,4 +101,4 @@ bool InitMessageFactory();
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_FACTORY_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_MESSAGE_FACTORY_H__

@ -32,11 +32,11 @@
#include <Python.h>
#include "google/protobuf/message_lite.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor_pool.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/message_factory.h"
#include "third_party/py/google/protobuf/proto_api.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/descriptor_pool.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message_factory.h"
#include "google/protobuf/proto_api.h"
namespace {

@ -31,7 +31,7 @@
// Author: anuraag@google.com (Anuraag Agrawal)
// Author: tibell@google.com (Johan Tibell)
#include "third_party/py/google/protobuf/pyext/repeated_composite_container.h"
#include "google/protobuf/pyext/repeated_composite_container.h"
#include <memory>
@ -41,11 +41,11 @@
#include "google/protobuf/dynamic_message.h"
#include "google/protobuf/message.h"
#include "google/protobuf/reflection.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor_pool.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/message_factory.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/descriptor_pool.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message_factory.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
namespace google {
namespace protobuf {

@ -31,13 +31,13 @@
// Author: anuraag@google.com (Anuraag Agrawal)
// Author: tibell@google.com (Johan Tibell)
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_COMPOSITE_CONTAINER_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_COMPOSITE_CONTAINER_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_COMPOSITE_CONTAINER_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_COMPOSITE_CONTAINER_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "third_party/py/google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message.h"
namespace google {
namespace protobuf {
@ -106,4 +106,4 @@ int AssignSubscript(RepeatedCompositeContainer* self,
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_COMPOSITE_CONTAINER_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_COMPOSITE_CONTAINER_H__

@ -31,7 +31,7 @@
// Author: anuraag@google.com (Anuraag Agrawal)
// Author: tibell@google.com (Johan Tibell)
#include "third_party/py/google/protobuf/pyext/repeated_scalar_container.h"
#include "google/protobuf/pyext/repeated_scalar_container.h"
#include <cstdint>
#include <memory>
@ -42,10 +42,10 @@
#include "google/protobuf/descriptor.h"
#include "google/protobuf/dynamic_message.h"
#include "google/protobuf/message.h"
#include "third_party/py/google/protobuf/pyext/descriptor.h"
#include "third_party/py/google/protobuf/pyext/descriptor_pool.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/descriptor.h"
#include "google/protobuf/pyext/descriptor_pool.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#define PyString_AsString(ob) \
(PyUnicode_Check(ob) ? PyUnicode_AsUTF8(ob) : PyBytes_AsString(ob))

@ -31,14 +31,14 @@
// Author: anuraag@google.com (Anuraag Agrawal)
// Author: tibell@google.com (Johan Tibell)
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_SCALAR_CONTAINER_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_SCALAR_CONTAINER_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_SCALAR_CONTAINER_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_SCALAR_CONTAINER_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "google/protobuf/descriptor.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message.h"
namespace google {
namespace protobuf {
@ -73,4 +73,4 @@ PyObject* Extend(RepeatedScalarContainer* self, PyObject* value);
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_SCALAR_CONTAINER_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_REPEATED_SCALAR_CONTAINER_H__

@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_SAFE_NUMERICS_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_SAFE_NUMERICS_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_SAFE_NUMERICS_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_SAFE_NUMERICS_H__
// Copied from chromium with only changes to the namespace.
#include <limits>
@ -161,4 +161,4 @@ inline Dest checked_numeric_cast(Source source) {
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_SAFE_NUMERICS_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_SAFE_NUMERICS_H__

@ -30,8 +30,8 @@
// Author: tibell@google.com (Johan Tibell)
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_SCOPED_PYOBJECT_PTR_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_SCOPED_PYOBJECT_PTR_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_SCOPED_PYOBJECT_PTR_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_SCOPED_PYOBJECT_PTR_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -96,4 +96,4 @@ typedef ScopedPythonPtr<PyObject> ScopedPyObjectPtr;
} // namespace python
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_SCOPED_PYOBJECT_PTR_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_SCOPED_PYOBJECT_PTR_H__

@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "third_party/py/google/protobuf/pyext/unknown_field_set.h"
#include "google/protobuf/pyext/unknown_field_set.h"
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -38,8 +38,8 @@
#include "google/protobuf/message.h"
#include "google/protobuf/unknown_field_set.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/wire_format_lite.h"
namespace google {

@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELD_SET_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELD_SET_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELD_SET_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELD_SET_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -37,7 +37,7 @@
#include <memory>
#include <set>
#include "third_party/py/google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message.h"
namespace google {
namespace protobuf {
@ -75,4 +75,4 @@ extern PyTypeObject PyUnknownField_Type;
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELD_SET_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELD_SET_H__

@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "third_party/py/google/protobuf/pyext/unknown_fields.h"
#include "google/protobuf/pyext/unknown_fields.h"
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -38,8 +38,8 @@
#include "google/protobuf/message.h"
#include "google/protobuf/unknown_field_set.h"
#include "third_party/py/google/protobuf/pyext/message.h"
#include "third_party/py/google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
#include "google/protobuf/wire_format_lite.h"
namespace google {

@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELDS_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELDS_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELDS_H__
#define GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELDS_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -37,7 +37,7 @@
#include <memory>
#include <set>
#include "third_party/py/google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/message.h"
namespace google {
namespace protobuf {
@ -88,4 +88,4 @@ void Clear(PyUnknownFields* self);
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELDS_H__
#endif // GOOGLE_PROTOBUF_PYTHON_CPP_UNKNOWN_FIELDS_H__

@ -33,8 +33,8 @@
// This module exposes the C proto inside the given Python proto, in
// case the Python proto is implemented with a C proto.
#ifndef THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
#define THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
#ifndef GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
#define GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@ -55,4 +55,4 @@ Message* MutableCProtoInsidePyProto(PyObject* msg);
} // namespace protobuf
} // namespace google
#endif // THIRD_PARTY_PY_GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
#endif // GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__

Loading…
Cancel
Save