diff options
author | Feng Xiao <xiaofeng@google.com> | 2016-10-19 17:33:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-19 17:33:59 -0700 |
commit | 9c6940f3bb4d7893b4d453870acd374c1ae43a58 (patch) | |
tree | b6ecea619f0c9b8553e444786419c3dd8b38a6e1 | |
parent | 008b5a228b37c054f46ba478ccafa5e855cb16db (diff) | |
parent | 7c913d821e5e8469a84d11f4f6509c37037b1779 (diff) | |
download | protobuf-9c6940f3bb4d7893b4d453870acd374c1ae43a58.tar.gz protobuf-9c6940f3bb4d7893b4d453870acd374c1ae43a58.tar.bz2 protobuf-9c6940f3bb4d7893b4d453870acd374c1ae43a58.zip |
Merge pull request #2264 from rshin/master
Place Python extensions correctly in Bazel build.
-rw-r--r-- | BUILD | 8 | ||||
-rw-r--r-- | python/google/protobuf/pyext/message.cc | 4 |
2 files changed, 8 insertions, 4 deletions
@@ -577,7 +577,7 @@ py_library( ) cc_binary( - name = "internal/_api_implementation.so", + name = "python/google/protobuf/internal/_api_implementation.so", srcs = ["python/google/protobuf/internal/api_implementation.cc"], copts = COPTS + [ "-DPYTHON_PROTO2_CPP_IMPL_V2", @@ -591,7 +591,7 @@ cc_binary( ) cc_binary( - name = "pyext/_message.so", + name = "python/google/protobuf/pyext/_message.so", srcs = glob([ "python/google/protobuf/pyext/*.cc", "python/google/protobuf/pyext/*.h", @@ -653,8 +653,8 @@ py_proto_library( data = select({ "//conditions:default": [], ":use_fast_cpp_protos": [ - ":internal/_api_implementation.so", - ":pyext/_message.so", + ":python/google/protobuf/internal/_api_implementation.so", + ":python/google/protobuf/pyext/_message.so", ], }), default_runtime = "", diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc index 7ff99aea..6626ddef 100644 --- a/python/google/protobuf/pyext/message.cc +++ b/python/google/protobuf/pyext/message.cc @@ -1905,7 +1905,11 @@ static PyObject* CopyFrom(CMessage* self, PyObject* arg) { // get OOM errors. The protobuf APIs do not provide any tools for processing // protobufs in chunks. If you have protos this big you should break them up if // it is at all convenient to do so. +#ifdef PROTOBUF_PYTHON_ALLOW_OVERSIZE_PROTOS +static bool allow_oversize_protos = true; +#else static bool allow_oversize_protos = false; +#endif // Provide a method in the module to set allow_oversize_protos to a boolean // value. This method returns the newly value of allow_oversize_protos. |