diff options
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/qpdf-c.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libqpdf/qpdf-c.cc b/libqpdf/qpdf-c.cc index 1f7b85cb..b45b564b 100644 --- a/libqpdf/qpdf-c.cc +++ b/libqpdf/qpdf-c.cc @@ -1949,3 +1949,15 @@ qpdf_write_json( }); return status; } + +std::shared_ptr<QPDF> +qpdf_c_get_qpdf(qpdf_data qpdf) +{ + return qpdf->qpdf; +} + +QPDF_ERROR_CODE +qpdf_c_wrap(qpdf_data qpdf, std::function<void()> fn) +{ + return trap_errors(qpdf, [&fn](qpdf_data) { fn(); }); +} |