Don't require trailing whitespace after uncommented parameters
authorColin Walters <walters@src.gnome.org>
Tue, 21 Oct 2008 21:35:35 +0000 (21:35 +0000)
committerColin Walters <walters@src.gnome.org>
Tue, 21 Oct 2008 21:35:35 +0000 (21:35 +0000)
svn path=/trunk/; revision=779

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

index b868303fdffd87e6fa7cdda6f8a03e371a8a22c3..dd572c6cb20d9d0707459ce7dd9f7c09c1046797 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-21  Colin Walters  <walters@verbum.org>
+
+       * giscanner/scannerlexer.l: Don't require trailing whitespace after
+       uncommented parameters.
+       * tests/*: Test it.
+
 2008-10-21  Colin Walters  <walters@verbum.org>
 
        * girepository/girepository.c: Ensure that when doing an unversioned
index 5a53cfcc8b437e6f6a52d1e5230ba1ff49ebfddc..9a1daf6a925e061715321a71d7796f56a61a7899 100644 (file)
@@ -228,9 +228,15 @@ parse_gtkdoc (GISourceScanner *scanner,
   if (!isline)
     return;
 
+  /* Ignore lines that don't have a : - this is a hack but avoids
+   * trying to parse too many things as annotations
+   */
+  if (!strchr (line, ':'))
+    return;
+
   line[i] = '\0';
 
-  parts = g_strsplit (line, ": ", 3);
+  parts = g_strsplit (line, ":", 3);
   n_parts = g_strv_length (parts);
 
   if (g_ascii_strcasecmp (parts[0], "eprecated") == 0)
@@ -295,11 +301,10 @@ parse_gtkdoc (GISourceScanner *scanner,
   directive = gi_source_directive_new (rname, value, options);
   directives = g_hash_table_lookup (scanner->directives_map, symbol);
   directives = g_slist_prepend (directives, directive);
-  g_hash_table_replace (scanner->directives_map, 
+  g_hash_table_replace (scanner->directives_map,
                        g_strdup (symbol), directives);
 
   g_strfreev (parts);
-  
 }
 
 
index b967b5b671189b9beade741e3b64db3428be1f79..5813d9a062ba6288c999037c13234963d85a04b5 100644 (file)
@@ -244,7 +244,7 @@ annotation_object_compute_sum_n(AnnotationObject *object,
 /**
  * annotation_object_allow_none: 
  * @object: a #GObject
- * @somearg: (allow-none): 
+ * @somearg: (allow-none):
  **/
 GObject*
 annotation_object_allow_none (AnnotationObject *object, gchar *somearg)