[glibmm] * tools/pm/WrapParser.pm (on_defs): Make sure we trim the module names to not have extraneous space.



commit ecc83e2f87c52b5222933cd1040b1573847ab992
Author: Hubert Figuiere <hub figuiere net>
Date:   Tue Jun 23 15:20:41 2009 -0400

    * tools/pm/WrapParser.pm (on_defs): Make sure we trim the module names to not have extraneous space. Closes bug #586785.

 ChangeLog              |    5 +++++
 tools/pm/WrapParser.pm |   11 +++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ac12e0d..f9d03e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-23  Hubert Figuiere  <hub figuiere net>
+
+	* tools/pm/WrapParser.pm (on_defs): Make sure we trim
+	the module names to not have extraneous space. Closes bug #586785.
+
 2009-06-22  José Alburquerque  <jaalburqu svn gnome org>
 
 	* glib/src/valuearray.ccg:
diff --git a/tools/pm/WrapParser.pm b/tools/pm/WrapParser.pm
index c59a615..dad3992 100644
--- a/tools/pm/WrapParser.pm
+++ b/tools/pm/WrapParser.pm
@@ -543,6 +543,14 @@ sub on_class($$)
   exit(-1);
 }
 
+# remove surround spaces from the string
+sub trim($)
+{
+    my $string = shift;
+    $string =~ s/^\s+//;
+    $string =~ s/\s+$//;
+    return $string;
+}
 
 # order to read the defs file
 # void on_defs()
@@ -552,6 +560,9 @@ sub on_defs($)
 
   my $str = $self->extract_bracketed_text();
   my ($module, $defsfile) = split(/,/, $str); #e.g. _DEFS(gtkmm,gtk), where gtkmm is the module name, and gtk is the defs file name.
+  $module = trim($module);
+  $defsfile = trim($defsfile);
+
   # $$self{section} = $section;  #Save it so that we can reuse it in read_defs_included.
   $$self{module} = $module; #Use it later in call to output_temp_g1().
 



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