This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Add assertion
authorKarl Williamson <public@khwilliamson.com>
Wed, 9 Nov 2011 05:20:08 +0000 (22:20 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 9 Nov 2011 05:38:38 +0000 (22:38 -0700)
regcomp.c

index 595fc6f..f9bf717 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -10455,6 +10455,7 @@ parseit:
                    U8 dummy[UTF8_MAXBYTES+1];
                    STRLEN dummy_len;
                    to_utf8_fold((U8*) "A", dummy, &dummy_len);
                    U8 dummy[UTF8_MAXBYTES+1];
                    STRLEN dummy_len;
                    to_utf8_fold((U8*) "A", dummy, &dummy_len);
+                   assert(PL_utf8_tofold); /* Verify that worked */
                }
                PL_utf8_foldclosures = _swash_inversion_hash(PL_utf8_tofold);
            }
                }
                PL_utf8_foldclosures = _swash_inversion_hash(PL_utf8_tofold);
            }