diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2018-09-20 15:59:19 +0200 |
---|---|---|
committer | Fabiano FidĂȘncio <fidencio@redhat.com> | 2018-09-21 08:23:21 +0200 |
commit | 7aef00fd50c7e30a045a6d698d074d8b20c51a82 (patch) | |
tree | b8c2e27588d4d2b95a75a418a5bc6f93e9aeb3b6 /osinfo/osinfo_loader.h | |
parent | 90e65193df7886b90256e2c7a1a34758e94eb8d7 (diff) | |
download | libosinfo-7aef00fd50c7e30a045a6d698d074d8b20c51a82.tar.gz |
loader: Introduce OSINFO_ERROR
Since glib commit 2.31.10~16 [1], g_set_error() will issue a warning if
it's passed a NULL domain. libosinfo is doing this in a few places (try
for example 'osinfo-query os winxp'). This commit adds a generic OSINFO_ERROR
domain which will be used instead of NULL. It's a bit inconsistent with
OSINFO_MEDIA_ERROR and OSINFO_TREE_ERROR in that they both start with
"osinfo-*" while OSINFO_ERROR uses "libosinfo". However, since
OsinfoLoader already makes use of that quark, changing that would
arguably be an (very small) ABI break.
[1] https://gitlab.gnome.org/GNOME/glib/commit/6d9f874330
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'osinfo/osinfo_loader.h')
-rw-r--r-- | osinfo/osinfo_loader.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/osinfo/osinfo_loader.h b/osinfo/osinfo_loader.h index 41bfb14..76beb7c 100644 --- a/osinfo/osinfo_loader.h +++ b/osinfo/osinfo_loader.h @@ -66,6 +66,14 @@ struct _OsinfoLoaderClass GType osinfo_loader_get_type(void); +/** + * OSINFO_ERROR: + * + * Error domain for generic libosinfo errors + */ +#define OSINFO_ERROR osinfo_error_quark() +GQuark osinfo_error_quark(void); + OsinfoLoader *osinfo_loader_new(void); OsinfoDb *osinfo_loader_get_db(OsinfoLoader *loader); |