[gtksourceview] Use a macro, the other way causes a warning



commit 4b979ae169c6ef6a737caaff4757bbbcf93931f4
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Jun 19 14:15:46 2010 +0200

    Use a macro, the other way causes a warning

 gtksourceview/gtksourcecontextengine.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/gtksourcecontextengine.c b/gtksourceview/gtksourcecontextengine.c
index f803476..b3666af 100644
--- a/gtksourceview/gtksourcecontextengine.c
+++ b/gtksourceview/gtksourcecontextengine.c
@@ -5762,6 +5762,8 @@ erase_segments (GtkSourceContextEngine *ce,
 	CHECK_TREE (ce);
 }
 
+#define IS_BOM(c) (c == 0xFEFF)
+
 /**
  * update_syntax:
  *
@@ -5848,7 +5850,7 @@ update_syntax (GtkSourceContextEngine *ce,
 		/* If it is the first line and it starts with BOM, skip it
 		 * since regexes in lang files do not take it into account */
 		gunichar c = gtk_text_iter_get_char (&start_iter);
-		if (c == '\xfeff') /* BOM */
+		if (IS_BOM (c))
 		{
 			gtk_text_iter_forward_char (&start_iter);
 			start_offset = gtk_text_iter_get_offset (&start_iter);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]