0001-minor-fixes-in-the-perl-script.patch
text/x-patch
Filename: 0001-minor-fixes-in-the-perl-script.patch
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0001
Subject: minor fixes in the perl script
| File | + | − |
|---|---|---|
| src/common/unicode/generate-unicode_case_table.pl | 5 | 7 |
From 63213dce1ee4a5c410f6b473424bee2bed6fdacb Mon Sep 17 00:00:00 2001
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Fri, 14 Mar 2025 12:14:12 +0200
Subject: [PATCH 1/3] minor fixes in the perl script
- casekind_index was unused, remove
- move the 'open', it seemed weirdly placed between building the special
map and determining it size.
---
src/common/unicode/generate-unicode_case_table.pl | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/common/unicode/generate-unicode_case_table.pl b/src/common/unicode/generate-unicode_case_table.pl
index 10b2dcc49d3..2b59d4d3e0b 100644
--- a/src/common/unicode/generate-unicode_case_table.pl
+++ b/src/common/unicode/generate-unicode_case_table.pl
@@ -231,17 +231,13 @@ while (my $line = <$FH>)
close $FH;
# assign sequential array indexes to the special mappings
-# 0 reserved for NULL
+# 0 is reserved for NULL
my $special_idx = 1;
foreach my $code (sort { $a <=> $b } (keys %special))
{
$special{$code}{Index} = $special_idx++;
}
-# Start writing out the output files
-open my $OT, '>', $output_table_file
- or die "Could not open output file $output_table_file: $!\n";
-
# determine size of array
my $num_special = scalar(keys %special) + 1;
@@ -249,6 +245,10 @@ die
"special case map contains $num_special entries which cannot be represented in uint8"
if ($num_special > 256);
+# Start writing out the output files
+open my $OT, '>', $output_table_file
+ or die "Could not open output file $output_table_file: $!\n";
+
print $OT <<"EOS";
/*-------------------------------------------------------------------------
*
@@ -420,8 +420,6 @@ die
"mapping tables contains $index entries which cannot be represented in uint16"
if ($index > 65536);
-my @casekind_index;
-
print $OT <<"EOS";
static const pg_wchar case_map_lower\[$index\] =
--
2.39.5