aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/pyext/message.cc
diff options
context:
space:
mode:
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;