python-zstandard: apply big-endian fix (issue6188)
This is a port of commit d4baf1f95b811f40773f5df0d8780fb2111ba6f5
from the upstream project to fix python-zstandard on 64-bit big-endian.
--- a/contrib/python-zstandard/c-ext/decompressor.c Sat Aug 17 01:49:28 2019 +0530
+++ b/contrib/python-zstandard/c-ext/decompressor.c Sun Aug 25 09:00:26 2019 -0700
@@ -68,13 +68,13 @@
};
ZstdCompressionDict* dict = NULL;
- size_t maxWindowSize = 0;
+ Py_ssize_t maxWindowSize = 0;
ZSTD_format_e format = ZSTD_f_zstd1;
self->dctx = NULL;
self->dict = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O!II:ZstdDecompressor", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O!nI:ZstdDecompressor", kwlist,
&ZstdCompressionDictType, &dict, &maxWindowSize, &format)) {
return -1;
}