gobject-introspection r646 - in trunk: . giscanner tests/scanner



Author: danw
Date: Thu Oct  2 16:21:40 2008
New Revision: 646
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=646&view=rev

Log:
	Bug 554490: g-ir-scanner gets confused by '\\'

	* giscanner/scannerlexer.l (chartext, stringtext): fix use of
	backslashes so it will correctly parse '\\' and "\\"

	* tests/scanner/annotation.c: add a use of '\\' to make sure that
	this stays fixed

	* giscanner/glibtransformer.py (GLibTransformer.count_type): typo


Modified:
   trunk/ChangeLog
   trunk/giscanner/glibtransformer.py
   trunk/giscanner/scannerlexer.l
   trunk/tests/scanner/annotation.c

Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py	(original)
+++ trunk/giscanner/glibtransformer.py	Thu Oct  2 16:21:40 2008
@@ -99,7 +99,7 @@
         objectcount = count_type(GLibObject)
         ifacecount = count_type(GLibInterface)
         enumcount = count_type(GLibEnum)
-        print " %d nodes; %d objects, %d interfaces, %d enumsr" \
+        print " %d nodes; %d objects, %d interfaces, %d enums" \
             % (len(nodes), objectcount, ifacecount, enumcount)
 
     def parse(self):

Modified: trunk/giscanner/scannerlexer.l
==============================================================================
--- trunk/giscanner/scannerlexer.l	(original)
+++ trunk/giscanner/scannerlexer.l	Thu Oct  2 16:21:40 2008
@@ -51,8 +51,8 @@
 fracconst				([0-9]*\.[0-9]+)|([0-9]+\.)
 exppart					[eE][-+]?[0-9]+
 floatsuffix				[fFlL]
-chartext				([^\'])|(\\.) 
-stringtext				([^\"])|(\\.)
+chartext				([^\\\'])|(\\.) 
+stringtext				([^\\\"])|(\\.)
 
 %%
 

Modified: trunk/tests/scanner/annotation.c
==============================================================================
--- trunk/tests/scanner/annotation.c	(original)
+++ trunk/tests/scanner/annotation.c	Thu Oct  2 16:21:40 2008
@@ -1,5 +1,7 @@
 #include "annotation.h"
 
+static char backslash_parsing_tester = '\\';
+
 G_DEFINE_TYPE (AnnotationObject, annotation_object, G_TYPE_OBJECT);
 
 static void
@@ -261,3 +263,5 @@
 {
   return NULL;
 }
+
+static char backslash_parsing_tester_2 = '\\';



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