mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Proper fix for podofo 0.9.6
This commit is contained in:
parent
dc130d90cd
commit
8b03d1d61a
@ -42,7 +42,7 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
|
|||||||
#if PODOFO_VERSION <= 0x000905
|
#if PODOFO_VERSION <= 0x000905
|
||||||
self->doc->Load(buffer, (long)size);
|
self->doc->Load(buffer, (long)size);
|
||||||
#else
|
#else
|
||||||
self->doc->LoadBuffer(buffer, (long)size);
|
self->doc->LoadFromBuffer(buffer, (long)size);
|
||||||
#endif
|
#endif
|
||||||
} catch(const PdfError & err) {
|
} catch(const PdfError & err) {
|
||||||
podofo_set_exception(err);
|
podofo_set_exception(err);
|
||||||
@ -60,11 +60,7 @@ PDFDoc_open(PDFDoc *self, PyObject *args) {
|
|||||||
|
|
||||||
if (PyArg_ParseTuple(args, "s", &fname)) {
|
if (PyArg_ParseTuple(args, "s", &fname)) {
|
||||||
try {
|
try {
|
||||||
#if PODOFO_VERSION <= 0x000905
|
|
||||||
self->doc->Load(fname);
|
self->doc->Load(fname);
|
||||||
#else
|
|
||||||
self->doc->LoadFromFile(fname);
|
|
||||||
#endif
|
|
||||||
} catch(const PdfError & err) {
|
} catch(const PdfError & err) {
|
||||||
podofo_set_exception(err);
|
podofo_set_exception(err);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user