This commit is contained in:
Kovid Goyal 2018-09-08 20:51:58 +05:30
parent d00b9e704a
commit dc130d90cd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -39,7 +39,11 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
if (PyArg_ParseTuple(args, "s#", &buffer, &size)) {
try {
#if PODOFO_VERSION <= 0x000905
self->doc->Load(buffer, (long)size);
#else
self->doc->LoadBuffer(buffer, (long)size);
#endif
} catch(const PdfError & err) {
podofo_set_exception(err);
return NULL;
@ -56,7 +60,11 @@ 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;
@ -633,4 +641,3 @@ PyTypeObject pdf::PDFDocType = {
};
// }}}