diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-11-30 14:23:31 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-12-02 17:57:42 -0500 |
commit | 1c4f09a52e16da3339ef12ce1322588836816151 (patch) | |
tree | ef84029eae4c3681977c90ab91309693f758a255 /pango/json | |
parent | 53d9610af5ce0861fba3c2c29bda9367a8bcca61 (diff) | |
download | pango-1c4f09a52e16da3339ef12ce1322588836816151.tar.gz |
Add gtk_json_parser_set_error
Diffstat (limited to 'pango/json')
-rw-r--r-- | pango/json/gtkjsonparser.c | 9 | ||||
-rw-r--r-- | pango/json/gtkjsonparserprivate.h | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/pango/json/gtkjsonparser.c b/pango/json/gtkjsonparser.c index a2acb043..fd9ba519 100644 --- a/pango/json/gtkjsonparser.c +++ b/pango/json/gtkjsonparser.c @@ -1129,3 +1129,12 @@ gtk_json_parser_end (GtkJsonParser *self) return TRUE; } +void +gtk_json_parser_set_error (GtkJsonParser *self, + GError *error) +{ + if (self->error) + g_error_free (error); + else + self->error = error; +} diff --git a/pango/json/gtkjsonparserprivate.h b/pango/json/gtkjsonparserprivate.h index f3ff43fd..81c001cc 100644 --- a/pango/json/gtkjsonparserprivate.h +++ b/pango/json/gtkjsonparserprivate.h @@ -60,6 +60,9 @@ gboolean gtk_json_parser_start_object (GtkJsonParser gboolean gtk_json_parser_start_array (GtkJsonParser *self); gboolean gtk_json_parser_end (GtkJsonParser *self); +void gtk_json_parser_set_error (GtkJsonParser *self, + GError *error); + G_END_DECLS |