diff options
author | Krzesimir Nowak <krzesimir@kinvolk.io> | 2016-05-13 08:08:49 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2016-05-17 21:13:20 +0000 |
commit | d5f61043351ff1c0bea650873ec2541e1ede1f0a (patch) | |
tree | f69177ab2797b6ef02b698e9be25e64db9692aa0 /src/libostree/ostree-autocleanups.h | |
parent | 24e3ccb7807cee22ab43af49b32fd24457793cc2 (diff) | |
download | ostree-d5f61043351ff1c0bea650873ec2541e1ede1f0a.tar.gz |
build: Allow ostree to use g_autoptr on its types internally
As an example, I g_autoptred one OstreeRepo in the "ostree init"
command.
Closes: #295
Approved by: cgwalters
Diffstat (limited to 'src/libostree/ostree-autocleanups.h')
-rw-r--r-- | src/libostree/ostree-autocleanups.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libostree/ostree-autocleanups.h b/src/libostree/ostree-autocleanups.h index d04ba9aa..7301ef1d 100644 --- a/src/libostree/ostree-autocleanups.h +++ b/src/libostree/ostree-autocleanups.h @@ -30,7 +30,10 @@ G_BEGIN_DECLS #define OSTREE_WITH_AUTOCLEANUPS 0 #endif -#if OSTREE_WITH_AUTOCLEANUPS && GLIB_CHECK_VERSION(2, 44, 0) +/* 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)) /* * The following types have no specific clear/free/unref functions, so |