LIT Output: Fix error converting anything to LIT on Windows. Fixes #2026795 [can't convert epub to lit](https://bugs.launchpad.net/calibre/+bug/2026795)

This commit is contained in:
Kovid Goyal 2023-07-12 11:55:24 +05:30
parent 88c92c56f7
commit 2a409302cd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -309,18 +309,10 @@ Compressor_compress(Compressor *self, PyObject *args, PyObject *kwds)
{ {
static char *kwlist[] = {"data", "flush", NULL}; static char *kwlist[] = {"data", "flush", NULL};
char *data = NULL; char *data = NULL;
unsigned int inlen = 0; Py_ssize_t inlen = 0;
int flush = 0; int flush = 0;
if (!PyArg_ParseTupleAndKeywords( if (!PyArg_ParseTupleAndKeywords(args, kwds, "y#|p", kwlist, &data, &inlen, &flush)) return NULL;
#if PYTHON_MAJOR_VERSION >= 3
args, kwds, "y#|b", kwlist, &data, &inlen, &flush)) {
#else
args, kwds, "s#|b", kwlist, &data, &inlen, &flush)) {
#endif
return NULL;
}
return Compressor_compress__(self, data, inlen, flush); return Compressor_compress__(self, data, inlen, flush);
} }