aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/google/protobuf/pyext/message.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc
index a8248888..df043818 100644
--- a/python/google/protobuf/pyext/message.cc
+++ b/python/google/protobuf/pyext/message.cc
@@ -2140,7 +2140,7 @@ static PyObject* ListFields(CMessage* self) {
PyList_SET_ITEM(all_fields.get(), actual_size, t.release());
++actual_size;
}
- if (actual_size != fields.size() &&
+ if (static_cast<size_t>(actual_size) != fields.size() &&
(PyList_SetSlice(all_fields.get(), actual_size, fields.size(), NULL) <
0)) {
return NULL;