This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
rmv duplicate SvUV call in Perl__swash_inversion_hash
authorDarin McBride <dmcbride@cpan.org>
Fri, 13 Jun 2014 20:59:02 +0000 (13:59 -0700)
committerKarl Williamson <khw@cpan.org>
Sat, 14 Jun 2014 20:43:51 +0000 (14:43 -0600)
utf8.c

diff --git a/utf8.c b/utf8.c
index f802199..cc79940 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -3405,15 +3405,17 @@ Perl__swash_inversion_hash(pTHX_ SV* const swash)
            for (i = 0; i <= av_tindex(list); i++) {
                SV** entryp = av_fetch(list, i, FALSE);
                SV* entry;
+               UV uv;
                if (entryp == NULL) {
                    Perl_croak(aTHX_ "panic: av_fetch() unexpectedly failed");
                }
                entry = *entryp;
-               /*DEBUG_U(PerlIO_printf(Perl_debug_log, "list for %"UVXf" contains %"UVXf"\n", val, SvUV(entry)));*/
-               if (SvUV(entry) == val) {
+               uv = SvUV(entry);
+               /*DEBUG_U(PerlIO_printf(Perl_debug_log, "list for %"UVXf" contains %"UVXf"\n", val, uv));*/
+               if (uv == val) {
                    found_key = TRUE;
                }
-               if (SvUV(entry) == inverse) {
+               if (uv == inverse) {
                    found_inverse = TRUE;
                }