build: Expose autocleanups unconditionally, start using them

I'd like to do this in rpm-ostree at least. Originally I was looking at porting
to `G_DECLARE_FINAL_TYPE` but eh, this is easier for now and won't bump our GLib
dependency which might matter for our embedded users.

For now I just did a few replacements in the `remote` command line. A full port
can come as we do other code cleanups.

This will actually break the flatpak build right now, but
that's easy to fix.  And we concluded in e.g.
https://bugs.freedesktop.org/show_bug.cgi?id=95065#c5
it's a bug for downstream projects to do that.

Closes: #756
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-03-28 20:19:15 +00:00
1 parent d994aee0a1
commit 97961ed2ce
11 files changed
+11 -15

No files matched your search

+1 -5
View File
@@ -26,14 +26,10 @@
G_BEGIN_DECLS
#ifndef OSTREE_WITH_AUTOCLEANUPS
#define OSTREE_WITH_AUTOCLEANUPS 0
#endif
/* ostree can use g_autoptr backports from libglnx when glib is too
* old, but still avoid exposing them to users that also have an old
* glib */
#if defined(OSTREE_COMPILATION) || (OSTREE_WITH_AUTOCLEANUPS && GLIB_CHECK_VERSION(2, 44, 0))
#if defined(OSTREE_COMPILATION) || GLIB_CHECK_VERSION(2, 44, 0)
/*
* The following types have no specific clear/free/unref functions, so