mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
88c92c56f7
commit
2a409302cd
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user