aboutsummaryrefslogtreecommitdiff
path: root/python/google/protobuf/pyext/message.cc
diff options
context:
space:
mode:
authorJisi Liu <jisi.liu@gmail.com>2017-07-25 11:52:33 -0700
committerJisi Liu <jisi.liu@gmail.com>2017-07-25 11:52:33 -0700
commit759245a49a00315a41b28da8fe52a2894d4f57ea (patch)
tree5a0032a1a3619a448d5301da131907ca8449730f /python/google/protobuf/pyext/message.cc
parent4bff88e0fb2338657a781eeee0c5362a57b57bf3 (diff)
downloadprotobuf-759245a49a00315a41b28da8fe52a2894d4f57ea.tar.gz
protobuf-759245a49a00315a41b28da8fe52a2894d4f57ea.tar.bz2
protobuf-759245a49a00315a41b28da8fe52a2894d4f57ea.zip
Merge from master
Diffstat (limited to 'python/google/protobuf/pyext/message.cc')
-rw-r--r--python/google/protobuf/pyext/message.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc
index 41c3f78d..702c5d03 100644
--- a/python/google/protobuf/pyext/message.cc
+++ b/python/google/protobuf/pyext/message.cc
@@ -1056,13 +1056,15 @@ int InternalDeleteRepeatedField(
if (PySlice_Check(slice)) {
from = to = step = slice_length = 0;
- PySlice_GetIndicesEx(
#if PY_MAJOR_VERSION < 3
+ PySlice_GetIndicesEx(
reinterpret_cast<PySliceObject*>(slice),
+ length, &from, &to, &step, &slice_length);
#else
+ PySlice_GetIndicesEx(
slice,
-#endif
length, &from, &to, &step, &slice_length);
+#endif
if (from < to) {
min = from;
max = to - 1;