summaryrefslogtreecommitdiff
path: root/src/qpdf
diff options
context:
space:
mode:
Diffstat (limited to 'src/qpdf')
-rw-r--r--src/qpdf/pikepdf.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qpdf/pikepdf.h b/src/qpdf/pikepdf.h
index 1ce9660..72a9786 100644
--- a/src/qpdf/pikepdf.h
+++ b/src/qpdf/pikepdf.h
@@ -301,10 +301,7 @@ inline char *fix_pypy36_const_char(const char *s)
inline void deprecation_warning(const char *msg)
{
- py::object warn = py::module_::import("warnings").attr("warn");
- py::object DeprecationWarning =
- py::module_::import("builtins").attr("DeprecationWarning");
- warn(msg, DeprecationWarning, /*stackleverl=*/1);
+ PyErr_WarnEx(PyExc_DeprecationWarning, msg, /*stacklevel=*/1);
}
// Support for recursion checks