libei/test
Peter Hutterer ab386f3cdb util: add an _unref_ cleanup + declaration function
To cut down on the boilerplate, an unref-able struct variable can now be
declared as
   _unref_(type) *name = NULL;
which is the equivalent of
   _cleanup_(type_unrefp) struct type *name = NULL;

Let's see how that style ends up reading.

This means we can get rid of the custom _cleanup_foo_ functions everywhere, no
need for all the extra #defines etc. A somewhat special case is systemd which
defines the various unrefp functions for us in the headers, so we can use them
directly.

OBJECT_IMPLEMENT_UNREF now also creates the unrefp function for this object -
this of course conflicts where DECLARE_UNREF_CLEANUP_FUNC is in scope. Not a
problem so far, let's see how we go.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-21 11:17:16 +10:00
..
buildtest.c Include stddef.h for size_t 2020-08-24 13:01:37 +10:00
buildtest.cc Add C++ header guards 2020-09-29 17:30:49 +10:00
eierpecken.c util: add an _unref_ cleanup + declaration function 2020-10-21 11:17:16 +10:00
eierpecken.h util: add an _unref_ cleanup + declaration function 2020-10-21 11:17:16 +10:00
test-ei.c util: add an _unref_ cleanup + declaration function 2020-10-21 11:17:16 +10:00
test-eis.c util: add an _unref_ cleanup + declaration function 2020-10-21 11:17:16 +10:00
unit-tests.c Factor out munit test handling into a set of helpers 2020-08-20 14:44:38 +10:00