mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01: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
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,12 @@
|
|||
* backwards compatibility with the existing high-level code that uses it.
|
||||
*/
|
||||
%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",
|
||||
"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;
|
||||
|
|
Loading…
Add table
Reference in a new issue