summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-12-30 08:55:49 -0700
committerKarl Williamson <public@khwilliamson.com>2011-12-30 11:08:31 -0700
commit92bcf67b45db4120d7804191d6a0f20e65711ad1 (patch)
tree0bac152394d1155b1d30d8902b495bbaaf590115 /lib
parente35c60199c9f4785aaed6664c8f422ef5b22526c (diff)
downloadperl-92bcf67b45db4120d7804191d6a0f20e65711ad1.tar.gz
Unicode:UCD: Add comments
Diffstat (limited to 'lib')
-rw-r--r--lib/Unicode/UCD.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm
index d5892f9c1a..17b4fead23 100644
--- a/lib/Unicode/UCD.pm
+++ b/lib/Unicode/UCD.pm
@@ -2812,8 +2812,20 @@ RETRY:
? hex $hex_end
: $begin;
- # If the property doesn't have a range that begins at 0, add one that
- # maps to the default value (for missing ranges).
+ # Each time through the loop (after the first):
+ # $invlist[-2] contains the beginning of the previous range processed
+ # $invlist[-1] contains the end+1 of the previous range processed
+ # $invmap[-2] contains the value of the previous range processed
+ # $invmap[-1] contains the default value for missing ranges ($missing)
+ #
+ # Thus, things are set up for the typical case of a new non-adjacent
+ # range of non-missings to be added. But, if the new range is
+ # adjacent, it needs to replace the [-1] elements; and if the new
+ # range is a multiple value of the previous one, it needs to be added
+ # to the [-2] map element.
+
+ # The first time through, everything will be empty. If the property
+ # doesn't have a range that begins at 0, add one that maps to $missing
if (! @invlist) {
if ($begin != 0) {
push @invlist, 0;