This patch adds support for Poppler 0.76 and later. Taken from upstream: diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp index 8484984bdf..4f798e35bf 100644 --- a/src/extension/internal/pdfinput/pdf-parser.cpp +++ b/src/extension/internal/pdfinput/pdf-parser.cpp @@ -421,7 +421,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) { error(errInternal, -1, "Weird page contents"); return; } - parser = new Parser(xref, new Lexer(xref, obj), gFalse); + parser = new _POPPLER_NEW_PARSER(xref, obj); go(topLevel); delete parser; parser = nullptr; diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h index 61a15083a0..5e8bc4ae90 100644 --- a/src/extension/internal/pdfinput/poppler-transition-api.h +++ b/src/extension/internal/pdfinput/poppler-transition-api.h @@ -14,6 +14,13 @@ #include +#if POPPLER_CHECK_VERSION(0, 76, 0) +#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse) +#else +#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse) +#endif + + #if POPPLER_CHECK_VERSION(0, 72, 0) #define getCString c_str #endif hash.hh?id=81d2fc9ffc3dbfc0fce2b85e267b18efbe24851a'>commitdiff
AgeCommit message (Expand)Author
2020-06-27daemon: Recognize SHA3 and BLAKE2s....* nix/libutil/hash.hh (HashType): Add htSHA3_256, htSHA3_512, and htBLAKE2s_256. * nix/libutil/hash.cc (parseHashType, printHashType): Recognize them. * tests/store.scm ("add-to-store"): Test these algorithms. Ludovic Courtès
2020-06-27daemon: Map directly to gcrypt hash functions....* nix/libutil/hash.hh (HashType): Map directly to GCRY_MD_ values. (md5HashSize, sha1HashSize, sha256HashSize, sha512HashSize): Remove. * nix/libutil/hash.cc (Hash::Hash): Use 'gcry_md_get_algo_dlen'. Ludovic Courtès