mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-29 13:28:19 +00:00
Add DeprecationWarning emission to Python free_record wrapper
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
parent
4a7a8fa213
commit
398f0790de
@ -36,6 +36,12 @@
|
|||||||
* backwards compatibility with the existing high-level code that uses it.
|
* backwards compatibility with the existing high-level code that uses it.
|
||||||
*/
|
*/
|
||||||
%rename(free_record) noop_free_record;
|
%rename(free_record) noop_free_record;
|
||||||
|
#ifdef SWIGPYTHON
|
||||||
|
%pythonprepend noop_free_record %{
|
||||||
|
import warnings
|
||||||
|
warnings.warn("free_record is now a no-op as the record's memory is handled automatically", DeprecationWarning)
|
||||||
|
%}
|
||||||
|
#endif
|
||||||
%feature("autodoc",
|
%feature("autodoc",
|
||||||
"This function used to free aa_log_record objects. Freeing is now handled "
|
"This function used to free aa_log_record objects. Freeing is now handled "
|
||||||
"automatically, so this no-op function remains for backwards compatibility.") noop_free_record;
|
"automatically, so this no-op function remains for backwards compatibility.") noop_free_record;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user