[gtk+/wip/otte/tokenizer: 78/78] csstokenizer: Export the error location
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/tokenizer: 78/78] csstokenizer: Export the error location
- Date: Fri, 25 Nov 2016 22:44:12 +0000 (UTC)
commit be2d3321aa382dc146c73d3275219d483979f9c2
Author: Benjamin Otte <otte redhat com>
Date: Fri Apr 8 15:25:53 2016 +0200
csstokenizer: Export the error location
gtk/gtkcsstokenizer.c | 2 +-
gtk/gtkcsstokenizerprivate.h | 9 +++++----
gtk/inspector/css-editor.c | 9 +++++----
3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkcsstokenizer.c b/gtk/gtkcsstokenizer.c
index 171c7f2..8f9fba3 100644
--- a/gtk/gtkcsstokenizer.c
+++ b/gtk/gtkcsstokenizer.c
@@ -588,7 +588,7 @@ gtk_css_tokenizer_emit_error (GtkCssTokenizer *tokenizer,
const GError *error)
{
if (tokenizer->error_func)
- tokenizer->error_func (tokenizer, token, error, tokenizer->user_data);
+ tokenizer->error_func (tokenizer, location, token, error, tokenizer->user_data);
else
g_warning ("Unhandled CSS error: %zu:%zu: %s", location->lines + 1, location->line_chars + 1,
error->message);
}
diff --git a/gtk/gtkcsstokenizerprivate.h b/gtk/gtkcsstokenizerprivate.h
index 7cd5f9f..54e4b5a 100644
--- a/gtk/gtkcsstokenizerprivate.h
+++ b/gtk/gtkcsstokenizerprivate.h
@@ -77,10 +77,11 @@ typedef struct _GtkCssDelimToken GtkCssDelimToken;
typedef struct _GtkCssNumberToken GtkCssNumberToken;
typedef struct _GtkCssDimensionToken GtkCssDimensionToken;
-typedef void (* GtkCssTokenizerErrorFunc) (GtkCssTokenizer *parser,
- const GtkCssToken *token,
- const GError *error,
- gpointer user_data);
+typedef void (* GtkCssTokenizerErrorFunc) (GtkCssTokenizer *parser,
+ const GtkCssLocation *location,
+ const GtkCssToken *token,
+ const GError *error,
+ gpointer user_data);
struct _GtkCssStringToken {
GtkCssTokenType type;
diff --git a/gtk/inspector/css-editor.c b/gtk/inspector/css-editor.c
index 2801d0a..c4206e7 100644
--- a/gtk/inspector/css-editor.c
+++ b/gtk/inspector/css-editor.c
@@ -615,10 +615,11 @@ update_token_tags (GtkInspectorCssEditor *ce,
}
static void
-tokenizer_error (GtkCssTokenizer *tokenizer,
- const GtkCssToken *token,
- const GError *error,
- gpointer unused)
+tokenizer_error (GtkCssTokenizer *tokenizer,
+ const GtkCssLocation *location,
+ const GtkCssToken *token,
+ const GError *error,
+ gpointer unused)
{
GtkCssChunk *chunk = (GtkCssChunk *) token;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]