diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qpdf/pikepdf.h | 5 |
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 |