[glib] glib-mkenums: Fix support for comment templates
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glib-mkenums: Fix support for comment templates
- Date: Thu, 6 May 2010 18:28:45 +0000 (UTC)
commit 7aa71527e592d3c46d08a784cf061c79e61d11d8
Author: Ryan Lortie <desrt desrt ca>
Date: Thu May 6 12:36:10 2010 -0500
glib-mkenums: Fix support for comment templates
Currently, specifying a comment template in the template file results in
the given template being appended to the default (C-style) one rather
than replacing it.
This causes it to be replaced outright.
Bug 617940.
gobject/glib-mkenums.in | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index 6dcb474..db4ebd3 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -174,8 +174,7 @@ my $eprod = ""; # per enum text (produced prior to value itarations)
my $vhead = ""; # value header, produced before iterating over enum values
my $vprod = ""; # value text, produced for each enum value
my $vtail = ""; # value tail, produced after iterating over enum values
-# other options
-my $comment_tmpl = "/* \ comment\@ */";
+my $comment_tmpl = ""; # comment template
sub read_template_file {
my ($file) = @_;
@@ -218,6 +217,9 @@ sub read_template_file {
$vprod = $tmpl{'value-production'};
$vtail = $tmpl{'value-tail'};
$comment_tmpl = $tmpl{'comment'};
+
+ # default to C-style comments
+ $comment_tmpl = "/* \ comment\@ */" if $comment_tmpl eq "";
}
if (!defined $ARGV[0]) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]