Centralize cleanup function definitions
We might as well do what systemd does and have a big header which defines all of them, to more conveniently share them for libraries that don't include them (like hawkey/librepo, as well as things that libgsystem doesn't yet cover).
This commit is contained in:
parent
a06ccfed05
commit
571fa8ddec
@ -30,7 +30,7 @@ librpmostree_la_SOURCES = \
|
||||
src/rpmostree-util.h \
|
||||
src/hif-utils.c \
|
||||
src/hif-utils.h \
|
||||
src/rpmostree-hawkey-utils.h \
|
||||
src/rpmostree-cleanup.h \
|
||||
src/rpmostree-treepkgdiff.c \
|
||||
src/rpmostree-treepkgdiff.h \
|
||||
src/rpmostree-builtin-rpm.h \
|
||||
|
@ -39,9 +39,6 @@ static GOptionEntry option_entries[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
GS_DEFINE_CLEANUP_FUNCTION0(GKeyFile*, _cleanup_g_key_file_unref, g_key_file_unref);
|
||||
#define _cleanup_gkeyfile_ __attribute__((cleanup(_cleanup_g_key_file_unref)))
|
||||
|
||||
gboolean
|
||||
rpmostree_builtin_rebase (int argc,
|
||||
char **argv,
|
||||
|
@ -35,6 +35,10 @@
|
||||
|
||||
#include "libgsystem.h"
|
||||
|
||||
/* This one is in libgsystem git master, but not 2014.2 */
|
||||
GS_DEFINE_CLEANUP_FUNCTION0(GKeyFile*, _cleanup_g_key_file_unref, g_key_file_unref);
|
||||
#define _cleanup_gkeyfile_ __attribute__((cleanup(_cleanup_g_key_file_unref)))
|
||||
|
||||
GS_DEFINE_CLEANUP_FUNCTION0(HySack, _cleanup_hy_sack_free, hy_sack_free);
|
||||
GS_DEFINE_CLEANUP_FUNCTION0(HyQuery, _cleanup_hy_query_free, hy_query_free);
|
||||
GS_DEFINE_CLEANUP_FUNCTION0(HyPackageList, _cleanup_hy_packagelist_free, hy_packagelist_free);
|
@ -36,7 +36,7 @@
|
||||
|
||||
#include "rpmostree-compose-builtins.h"
|
||||
#include "rpmostree-util.h"
|
||||
#include "rpmostree-hawkey-utils.h"
|
||||
#include "rpmostree-cleanup.h"
|
||||
#include "rpmostree-treepkgdiff.h"
|
||||
#include "rpmostree-postprocess.h"
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "string.h"
|
||||
|
||||
#include "rpmostree-treepkgdiff.h"
|
||||
#include "rpmostree-hawkey-utils.h"
|
||||
#include "rpmostree-cleanup.h"
|
||||
|
||||
gboolean
|
||||
rpmostree_get_pkglist_for_root (GFile *root,
|
||||
|
@ -21,7 +21,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <ostree.h>
|
||||
#include "rpmostree-hawkey-utils.h"
|
||||
#include "rpmostree-cleanup.h"
|
||||
|
||||
gboolean
|
||||
rpmostree_get_pkglist_for_root (GFile *root,
|
||||
|
Loading…
x
Reference in New Issue
Block a user