From bbbdabf24dd5b42a71bf73ad195070ebfc1b2943 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Date: Tue, 10 Jan 2017 17:41:02 +0900
Subject: [PATCH 2/3] Correct reference resolution syntax

Reference resolution of a hash is to written as '$x->{a}' but some of
them are written as '$${a}'. This patch unifies the syntax.
---
 src/backend/utils/mb/Unicode/convutils.pm | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm
index 7adcee4..0ae79a2 100644
--- a/src/backend/utils/mb/Unicode/convutils.pm
+++ b/src/backend/utils/mb/Unicode/convutils.pm
@@ -168,20 +168,20 @@ sub print_from_utf8_map
 		   "static const pg_utf_to_local ULmap${charset}[ %d ] = {",
 		   scalar(@$table));
 	my $first = 1;
-	foreach my $i (sort {$$a{utf8} <=> $$b{utf8}} @$table)
+	foreach my $i (sort {$a->{utf8} <=> $b->{utf8}} @$table)
     {
 		print($out ",") if (!$first);
 		$first = 0;
 		print($out "\t/* $last_comment */") if ($verbose);
 
-		printf($out "\n  {0x%04x, 0x%04x}", $$i{utf8}, $$i{code});
+		printf($out "\n  {0x%04x, 0x%04x}", $i->{utf8}, $i->{code});
 		if ($verbose >= 2)
 		{
-			$last_comment = "$$i{f}:$$i{l} $$i{comment}";
+			$last_comment = "$i->{f}:$i->{l} $i->{comment}";
 		}
 		else
 		{
-			$last_comment = $$i{comment};
+			$last_comment = $i->{comment};
 		}
 	}
 	print($out "\t/* $last_comment */") if ($verbose);
@@ -202,14 +202,14 @@ sub print_from_utf8_combined_map
 		   "static const pg_utf_to_local_combined ULmap${charset}_combined[ %d ] = {",
 		   scalar(@$table));
 	my $first = 1;
-	foreach my $i (sort {$$a{utf8} <=> $$b{utf8}} @$table)
+	foreach my $i (sort {$a->{utf8} <=> $b->{utf8}} @$table)
     {
 		print($out ",") if (!$first);
 		$first = 0;
 		print($out "\t/* $last_comment */") if ($verbose);
 
-		printf($out "\n  {0x%08x, 0x%08x, 0x%04x}", $$i{utf8}, $$i{utf8_second}, $$i{code});
-		$last_comment = "$$i{comment}";
+		printf($out "\n  {0x%08x, 0x%08x, 0x%04x}", $i->{utf8}, $i->{utf8_second}, $i->{code});
+		$last_comment = "$i->{comment}";
 	}
 	print($out "\t/* $last_comment */") if ($verbose);
 	print $out "\n};\n";
@@ -230,20 +230,20 @@ sub print_to_utf8_map
 		   "static const pg_local_to_utf LUmap${charset}[ %d ] = {",
 		   scalar(@$table));
 	my $first = 1;
-	foreach my $i (sort {$$a{code} <=> $$b{code}} @$table)
+	foreach my $i (sort {$a->{code} <=> $b->{code}} @$table)
     {
 		print($out ",") if (!$first);
 		$first = 0;
 		print($out "\t/* $last_comment */") if ($verbose);
 
-		printf($out "\n  {0x%04x, 0x%x}", $$i{code}, $$i{utf8});
+		printf($out "\n  {0x%04x, 0x%x}", $i->{code}, $i->{utf8});
 		if ($verbose >= 2)
 		{
-			$last_comment = "$$i{f}:$$i{l} $$i{comment}";
+			$last_comment = "$i->{f}:$i->{l} $i->{comment}";
 		}
 		else
 		{
-			$last_comment = $$i{comment};
+			$last_comment = $i->{comment};
 		}
 	}
 	print($out "\t/* $last_comment */") if ($verbose);
@@ -265,14 +265,14 @@ sub print_to_utf8_combined_map
 		   "static const pg_local_to_utf_combined LUmap${charset}_combined[ %d ] = {",
 		   scalar(@$table));
 	my $first = 1;
-	foreach my $i (sort {$$a{code} <=> $$b{code}} @$table)
+	foreach my $i (sort {$a->{code} <=> $b->{code}} @$table)
     {
 		print($out ",") if (!$first);
 		$first = 0;
 		print($out "\t/* $last_comment */") if ($verbose);
 
-		printf($out "\n  {0x%04x, 0x%08x, 0x%08x}", $$i{code}, $$i{utf8}, $$i{utf8_second});
-		$last_comment = "$$i{comment}";
+		printf($out "\n  {0x%04x, 0x%08x, 0x%08x}", $i->{code}, $i->{utf8}, $i->{utf8_second});
+		$last_comment = "$i->{comment}";
 	}
 	print($out "\t/* $last_comment */") if ($verbose);
 	print $out "\n};\n";
-- 
2.9.2

