Skip to content

Commit

Permalink
Fix build error with Python 3.10 build on Windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acozzette committed Jan 11, 2022
1 parent 922a7ec commit 203c593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/google/protobuf/pyext/unknown_fields.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ const UnknownField* GetUnknownField(PyUnknownFieldRef* self) {
"The parent message might be cleared.");
return NULL;
}
ssize_t total_size = fields->field_count();
Py_ssize_t total_size = fields->field_count();
if (self->index >= total_size) {
PyErr_Format(PyExc_ValueError,
"UnknownField does not exist. "
Expand Down

0 comments on commit 203c593

Please sign in to comment.