Proper fix for podofo 0.9.6

This commit is contained in:
Kovid Goyal 2018-09-08 21:32:25 +05:30
parent dc130d90cd
commit 8b03d1d61a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -42,7 +42,7 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
#if PODOFO_VERSION <= 0x000905
self->doc->Load(buffer, (long)size);
#else
self->doc->LoadBuffer(buffer, (long)size);
self->doc->LoadFromBuffer(buffer, (long)size);
#endif
} catch(const PdfError & err) {
podofo_set_exception(err);
@ -60,11 +60,7 @@ PDFDoc_open(PDFDoc *self, PyObject *args) {
if (PyArg_ParseTuple(args, "s", &fname)) {
try {
#if PODOFO_VERSION <= 0x000905
self->doc->Load(fname);
#else
self->doc->LoadFromFile(fname);
#endif
} catch(const PdfError & err) {
podofo_set_exception(err);
return NULL;