diff --git a/libqpdf/qpdf-c.cc b/libqpdf/qpdf-c.cc index 85dda3b9..a5dda2a8 100644 --- a/libqpdf/qpdf-c.cc +++ b/libqpdf/qpdf-c.cc @@ -12,6 +12,7 @@ #include #include #include +#include struct _qpdf_error { @@ -120,7 +121,8 @@ static void call_check(qpdf_data qpdf) w.write(); } -static QPDF_ERROR_CODE trap_errors(qpdf_data qpdf, void (*fn)(qpdf_data)) +static QPDF_ERROR_CODE trap_errors( + qpdf_data qpdf, std::function fn) { QPDF_ERROR_CODE status = QPDF_SUCCESS; try