24#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
25#error "Only <glib.h> can be included directly."
43typedef struct _GError GError;
74#define G_DEFINE_EXTENDED_ERROR(ErrorType, error_type) \
75static inline ErrorType ## Private * \
76error_type ## _get_private (const GError *error) \
79 const gsize sa = 2 * sizeof (gsize); \
80 const gsize as = (sizeof (ErrorType ## Private) + (sa - 1)) & -sa; \
81 g_return_val_if_fail (error != NULL, NULL); \
82 g_return_val_if_fail (error->domain == error_type ## _quark (), NULL); \
83 return (ErrorType ## Private *) (((guint8 *)error) - as); \
87g_error_with_ ## error_type ## _private_init (GError *error) \
89 ErrorType ## Private *priv = error_type ## _get_private (error); \
90 error_type ## _private_init (priv); \
94g_error_with_ ## error_type ## _private_copy (const GError *src_error, \
97 const ErrorType ## Private *src_priv = error_type ## _get_private (src_error); \
98 ErrorType ## Private *dest_priv = error_type ## _get_private (dest_error); \
99 error_type ## _private_copy (src_priv, dest_priv); \
103g_error_with_ ## error_type ## _private_clear (GError *error) \
105 ErrorType ## Private *priv = error_type ## _get_private (error); \
106 error_type ## _private_clear (priv); \
110error_type ## _quark (void) \
113 static gsize initialized = 0; \
115 if (g_once_init_enter (&initialized)) \
117 q = g_error_domain_register_static (#ErrorType, \
118 sizeof (ErrorType ## Private), \
119 g_error_with_ ## error_type ## _private_init, \
120 g_error_with_ ## error_type ## _private_copy, \
121 g_error_with_ ## error_type ## _private_clear); \
122 g_once_init_leave (&initialized, 1); \
142typedef void (*GErrorInitFunc) (GError *
error);
160typedef void (*GErrorCopyFunc) (
const GError *src_error, GError *dest_error);
175typedef void (*GErrorClearFunc) (GError *
error);
178GQuark g_error_domain_register_static (
const char *error_type_name,
179 gsize error_type_private_size,
180 GErrorInitFunc error_type_init,
181 GErrorCopyFunc error_type_copy,
182 GErrorClearFunc error_type_clear);
185GQuark g_error_domain_register (
const char *error_type_name,
186 gsize error_type_private_size,
187 GErrorInitFunc error_type_init,
188 GErrorCopyFunc error_type_copy,
189 GErrorClearFunc error_type_clear);
192GError* g_error_new (
GQuark domain,
198GError* g_error_new_literal (
GQuark domain,
200 const
gchar *message);
202GError* g_error_new_valist (
GQuark domain,
208void g_error_free (GError *
error);
210GError* g_error_copy (const GError *
error);
221void g_set_error (GError **err,
228void g_set_error_literal (GError **err,
231 const
gchar *message);
236void g_propagate_error (GError **dest,
241void g_clear_error (GError **err);
245void g_prefix_error (GError **err,
251void g_prefix_error_literal (GError **err,
252 const
gchar *prefix);
256void g_propagate_prefixed_error (GError **dest,
#define GLIB_AVAILABLE_IN_2_68
#define GLIB_AVAILABLE_IN_2_70
#define GLIB_AVAILABLE_IN_ALL
#define G_GNUC_PRINTF(format_idx, arg_idx)
G_BEGIN_DECLS typedef guint32 GQuark
G_BEGIN_DECLS typedef char gchar
json_t format(printf, 1, 2)))
static void error(LoadState *S, const char *why)