changeset 42812:a4e32fd539ab stable 5.1.1

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 25 Aug 2019 09:00:26 -0700
parents 3332bde53714
children 10841b9a80c3 662a4ae78a6d
files contrib/python-zstandard/c-ext/decompressor.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	}