diff options
author | James R. Barlow <james@purplerock.ca> | 2021-08-23 03:38:33 -0700 |
---|---|---|
committer | James R. Barlow <james@purplerock.ca> | 2021-08-23 03:38:33 -0700 |
commit | b576d02b4b96b1dc9077d670528709ec1840c5f7 (patch) | |
tree | f0b9a6b3a3f0a9a1034c9e3e40c238767fb341ea /src/qpdf/pikepdf.h | |
parent | 8cbb99616b08d2b5722ee4029db6b061d3dc5e14 (diff) |
Deprecation warning: use direct API
Diffstat (limited to 'src/qpdf/pikepdf.h')
-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 |