mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-05 16:55:32 +00:00
Annotate SWIG aa_log_record alloc+dealloc
Swig generates a "thisown" attribute, which is an escape hatch in case
higher-level code does something weird and needs to tell SWIG whether to
free the C object when Python garbage collects it. Adding this attribute
is not a breaking change w.r.t access to the other attributes of the parsed
record.
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
(cherry picked from commit e5fd0fc636
)
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -118,6 +118,9 @@ class AAPythonBindingsTests(unittest.TestCase):
|
||||
# FIXME: out files should report log version?
|
||||
# FIXME: or can we just deprecate v1 logs?
|
||||
continue
|
||||
elif key == "thisown":
|
||||
# SWIG generates this key to track memory allocation
|
||||
continue
|
||||
elif key in NO_VALUE_MAP:
|
||||
if NO_VALUE_MAP[key] == value:
|
||||
continue
|
||||
|
Reference in New Issue
Block a user