Bug 554490: g-ir-scanner gets confused by '\\'
authorDan Winship <danw@src.gnome.org>
Thu, 2 Oct 2008 16:21:40 +0000 (16:21 +0000)
committerDan Winship <danw@src.gnome.org>
Thu, 2 Oct 2008 16:21:40 +0000 (16:21 +0000)
* 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

svn path=/trunk/; revision=646

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

index 66e4b87..100df01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-09-30  Dan Winship  <danw@gnome.org>
+
+       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
+
 2008-10-02  Colin Walters  <walters@verbum.org>
 
        bug 552393: Note variadic functions
index dbe32de..89b7bd4 100644 (file)
@@ -99,7 +99,7 @@ class GLibTransformer(object):
         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):
index 4f3a0c1..a3efbf5 100644 (file)
@@ -51,8 +51,8 @@ intsuffix                             ([uU][lL]?[lL]?)|([lL][lL]?[uU]?)
 fracconst                              ([0-9]*\.[0-9]+)|([0-9]+\.)
 exppart                                        [eE][-+]?[0-9]+
 floatsuffix                            [fFlL]
-chartext                               ([^\'])|(\\.) 
-stringtext                             ([^\"])|(\\.)
+chartext                               ([^\\\'])|(\\.) 
+stringtext                             ([^\\\"])|(\\.)
 
 %%
 
index fc0dbd4..00df78c 100644 (file)
@@ -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 @@ annotation_object_do_not_use (AnnotationObject *object)
 {
   return NULL;
 }
+
+static char backslash_parsing_tester_2 = '\\';