aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/pyext
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@google.com>2016-11-17 17:04:30 -0800
committerGravatar Adam Cozzette <acozzette@google.com>2016-11-17 17:04:30 -0800
commit5d63097fc2b7f405f53d6ca4ad3c1ebd98d80ddd (patch)
tree50d8116271f024e16334785464c794da85f3ce12 /python/google/protobuf/pyext
parent5a76e633ea9b5adb215e93fdc11e1c0c08b3fc74 (diff)
parentcd315dcbadc02569e145bde16e3f66c2fbb08e31 (diff)
Merge branch 'master' into down-integrate-with-msvc-fix
Diffstat (limited to 'python/google/protobuf/pyext')
-rw-r--r--python/google/protobuf/pyext/message.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc
index 5967a587..4f3abc84 100644
--- a/python/google/protobuf/pyext/message.cc
+++ b/python/google/protobuf/pyext/message.cc
@@ -1994,7 +1994,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.