diff options
author | Richard Shin <ricshin@cs.berkeley.edu> | 2016-10-19 13:36:23 -0700 |
---|---|---|
committer | Richard Shin <ricshin@cs.berkeley.edu> | 2016-10-19 13:36:23 -0700 |
commit | 7c913d821e5e8469a84d11f4f6509c37037b1779 (patch) | |
tree | b6ecea619f0c9b8553e444786419c3dd8b38a6e1 /python | |
parent | df5841f0b2a523abeb2fc304e024cd623f13d2f1 (diff) |
Use -DPROTOBUF_PYTHON_ALLOW_OVERSIZE_PROTOS
Diffstat (limited to 'python')
-rw-r--r-- | python/google/protobuf/pyext/message.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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. |