Commit Graph

4 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
ab25fa42cc gtype: Define auto-cleanup functions for Module class
While we automatically define cleanup functions for the module, we don't
do it for the module class.

This will allow to manage the ownership of the class when reffing it
without having to cast it to GTypeClass.
2019-12-13 20:07:51 +01:00
Philip Withnall
df647a583d tests: Fix a couple of static analysis warnings in autoptr tests
The static analyser can’t yet work out how `g_autofree` works, so
disable those tests.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1767
2019-09-05 14:17:02 +01:00
Marco Trevisan (Treviño)
1d96e94070 gmacros: Add g_autoqueue to automatically free queues
This works as g_auto(s)list already does, and allows to create queues that are
fully auto free'd on destruction.
2019-05-08 14:25:24 -05:00
Marco Trevisan (Treviño)
8d42b0246b gobject, tests: add tests for autoptr (and lists) with declared
Add tests using an object declared with G_DECLARE_FINAL_TYPE, that is derived
from another, declared using G_DECLARE_DERIVABLE_TYPE, and that
thus uses _GLIB_DEFINE_AUTOPTR_CHAINUP to define cleanup functions.

And verify that both g_autoptr(Type) and g_auto(s)list(Type) work
2018-11-14 22:47:39 -06:00