diff options
author | Benjamin Otte <otte@redhat.com> | 2011-05-18 18:32:22 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-05-18 22:17:59 +0200 |
commit | d2ef71627b5021108086143c0afaefb9ee196a7d (patch) | |
tree | 99a3e913b532f30272d8cc50d8f7d8f0b073dcb8 /gtk/gtkcssparser.c | |
parent | 03e84b7ee3b4b868e9aa57c8d779d11bcc9a93cd (diff) | |
download | gtk+-d2ef71627b5021108086143c0afaefb9ee196a7d.tar.gz |
css: Make property parsing functions take a css parser
Instead of reading a string and then passing that in, let the parse
functions use the full power of the parser.
Diffstat (limited to 'gtk/gtkcssparser.c')
-rw-r--r-- | gtk/gtkcssparser.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c index de798e781a..c956fd5bb9 100644 --- a/gtk/gtkcssparser.c +++ b/gtk/gtkcssparser.c @@ -108,6 +108,15 @@ _gtk_css_parser_get_position (GtkCssParser *parser) } void +_gtk_css_parser_take_error (GtkCssParser *parser, + GError *error) +{ + parser->error_func (parser, error, parser->user_data); + + g_error_free (error); +} + +void _gtk_css_parser_error (GtkCssParser *parser, const char *format, ...) @@ -122,9 +131,7 @@ _gtk_css_parser_error (GtkCssParser *parser, format, args); va_end (args); - parser->error_func (parser, error, parser->user_data); - - g_error_free (error); + _gtk_css_parser_take_error (parser, error); } static gboolean |