Skip to content

Commit 203c593

Browse files
committed
Fix build error with Python 3.10 build on Windows
The Windows build for Python 3.10 is giving us an error about ssize_t being undefined, so this commit fixes the problem by replacing it with Py_ssize_t, which is consistent with what we do elsewhere in the file.
1 parent 922a7ec commit 203c593

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/google/protobuf/pyext/unknown_fields.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const UnknownField* GetUnknownField(PyUnknownFieldRef* self) {
219219
"The parent message might be cleared.");
220220
return NULL;
221221
}
222-
ssize_t total_size = fields->field_count();
222+
Py_ssize_t total_size = fields->field_count();
223223
if (self->index >= total_size) {
224224
PyErr_Format(PyExc_ValueError,
225225
"UnknownField does not exist. "

0 commit comments

Comments
 (0)