summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHubert Figuiere <hub@figuiere.net>2009-06-23 15:20:41 -0400
committerHubert Figuiere <hub@figuiere.net>2009-06-23 15:20:41 -0400
commitecc83e2f87c52b5222933cd1040b1573847ab992 (patch)
tree395af647b307eaad1f863d38ed9987f62a12258b /tools
parent0356821ab90377418c9d827a1df475201a03838f (diff)
downloadglibmm-ecc83e2f87c52b5222933cd1040b1573847ab992.tar.gz
* tools/pm/WrapParser.pm (on_defs): Make sure we trim the module names to not have extraneous space. Closes bug #586785.
Diffstat (limited to 'tools')
-rw-r--r--tools/pm/WrapParser.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/pm/WrapParser.pm b/tools/pm/WrapParser.pm
index c59a6154..dad39927 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().