summaryrefslogtreecommitdiff
path: root/regen/mk_PL_charclass.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-05-13 17:46:00 -0600
committerKarl Williamson <khw@cpan.org>2015-08-01 10:34:50 -0600
commite8368231412c57222c53c0dc1fac7f711fa051e2 (patch)
tree345c32b7ca8c46b541ec41aec2e9c9102606e772 /regen/mk_PL_charclass.pl
parent2a70536ef492d7fd0a8c857eecc3f2d6fe143728 (diff)
downloadperl-e8368231412c57222c53c0dc1fac7f711fa051e2.tar.gz
regen/mk_PL_charclass.pl: Suppress extra null array element
We don't output a trailing comma after the final element in these C arrays, and thus prevent the C compiler from generating a useless null element
Diffstat (limited to 'regen/mk_PL_charclass.pl')
-rw-r--r--regen/mk_PL_charclass.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/regen/mk_PL_charclass.pl b/regen/mk_PL_charclass.pl
index 1cabfc4de9..86f316206b 100644
--- a/regen/mk_PL_charclass.pl
+++ b/regen/mk_PL_charclass.pl
@@ -343,6 +343,8 @@ foreach my $charset (get_supported_code_pages()) {
? sprintf "/* U+%02X %s */ %s,\n", $ord, $name, $bits[$ord]
: sprintf "/* 0x%02X U+%02X %s */ %s,\n", $index, $ord, $name, $bits[$ord];
}
+ $out[-1] =~ s/,$//; # No trailing comma in the final entry
+
print $out_fh join "", @out;
print $out_fh "\n" . get_conditional_compile_line_end();
}