diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-15 11:29:37 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-15 11:34:44 +0100 |
commit | cf95fcc7a45bb210338b22591b257351aac2be98 (patch) | |
tree | 0b56b2733e0a4417c76f512a09b24fab38018709 /build-aux | |
parent | 4241b2b0c807658d9623e853a9da68eb9ba63198 (diff) |
qmi-codegen,libqmi-glib: define autoptr cleanup functions for all types
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/qmi-codegen/Client.py | 1 | ||||
-rw-r--r-- | build-aux/qmi-codegen/Container.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/build-aux/qmi-codegen/Client.py b/build-aux/qmi-codegen/Client.py index 94f64eb..116af86 100644 --- a/build-aux/qmi-codegen/Client.py +++ b/build-aux/qmi-codegen/Client.py @@ -101,6 +101,7 @@ class Client: '};\n' '\n' 'GType ${underscore}_get_type (void);\n' + 'G_DEFINE_AUTOPTR_CLEANUP_FUNC (${camelcase}, g_object_unref);\n' '\n') hfile.write(string.Template(template).substitute(translations)) diff --git a/build-aux/qmi-codegen/Container.py b/build-aux/qmi-codegen/Container.py index f0bf6fe..1f6f782 100644 --- a/build-aux/qmi-codegen/Container.py +++ b/build-aux/qmi-codegen/Container.py @@ -192,7 +192,8 @@ class Container: ' *\n' ' * Since: ${since}\n' ' */\n' - '${static}void ${underscore}_unref (${camelcase} *self);\n') + '${static}void ${underscore}_unref (${camelcase} *self);\n' + 'G_DEFINE_AUTOPTR_CLEANUP_FUNC (${camelcase}, ${underscore}_unref);\n') if self.readonly == False: template += ( '\n' |