summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-04-10 18:16:10 +0200
committerBenjamin Otte <otte@redhat.com>2019-04-12 19:34:28 +0200
commit76826cfa2f37a2cd005c1ead26facef2fb6526a5 (patch)
treed4b058380a6adbcd1cef6f3de442455b3d976929
parent37671d2bd0802dca8822b096c90064911eee9f58 (diff)
downloadgtk+-76826cfa2f37a2cd005c1ead26facef2fb6526a5.tar.gz
cssparser: Pass in error locations explicitly
And for the quick function, use the start/end location of the current token.
-rw-r--r--gtk/css/gtkcssparser.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/css/gtkcssparser.c b/gtk/css/gtkcssparser.c
index 1a4a7567a7..b3347ee067 100644
--- a/gtk/css/gtkcssparser.c
+++ b/gtk/css/gtkcssparser.c
@@ -511,8 +511,8 @@ gtk_css_parser_error_syntax (GtkCssParser *self,
GTK_CSS_PARSER_ERROR_SYNTAX,
format, args);
gtk_css_parser_emit_error (self,
- &self->location,
- gtk_css_tokenizer_get_location (self->tokenizer),
+ gtk_css_parser_get_start_location (self),
+ gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
@@ -531,8 +531,8 @@ gtk_css_parser_error_value (GtkCssParser *self,
GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
format, args);
gtk_css_parser_emit_error (self,
- &self->location,
- gtk_css_tokenizer_get_location (self->tokenizer),
+ gtk_css_parser_get_start_location (self),
+ gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
@@ -551,8 +551,8 @@ gtk_css_parser_error_import (GtkCssParser *self,
GTK_CSS_PARSER_ERROR_IMPORT,
format, args);
gtk_css_parser_emit_error (self,
- &self->location,
- gtk_css_tokenizer_get_location (self->tokenizer),
+ gtk_css_parser_get_start_location (self),
+ gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
@@ -571,8 +571,8 @@ gtk_css_parser_warn_syntax (GtkCssParser *self,
GTK_CSS_PARSER_WARNING_SYNTAX,
format, args);
gtk_css_parser_emit_error (self,
- &self->location,
- gtk_css_tokenizer_get_location (self->tokenizer),
+ gtk_css_parser_get_start_location (self),
+ gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);