Re: Named-capture regex syntax
[p5sagit/p5-mst-13.2.git] / pp_sort.c
index 0c5f5c1..6899ff4 100644 (file)
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1695,9 +1695,9 @@ PP(pp_sort)
                            : ( overloading ? S_amagic_ncmp : S_sv_ncmp ) )
                        : ( IN_LOCALE_RUNTIME
                            ? ( overloading
-                               ? S_amagic_cmp_locale
-                               : sv_cmp_locale_static)
-                           : ( overloading ? S_amagic_cmp : sv_cmp_static)),
+                               ? (SVCOMPARE_t)S_amagic_cmp_locale
+                               : (SVCOMPARE_t)sv_cmp_locale_static)
+                           : ( overloading ? (SVCOMPARE_t)S_amagic_cmp : (SVCOMPARE_t)sv_cmp_static)),
                    sort_flags);
        }
        if ((priv & OPpSORT_REVERSE) != 0) {
@@ -1770,12 +1770,12 @@ S_sortcv_stacked(pTHX_ SV *a, SV *b)
        SV** ary = AvALLOC(av);
        if (AvARRAY(av) != ary) {
            AvMAX(av) += AvARRAY(av) - AvALLOC(av);
-           SvPV_set(av, (char*)ary);
+           AvARRAY(av) = ary;
        }
        if (AvMAX(av) < 1) {
            AvMAX(av) = 1;
            Renew(ary,2,SV*);
-           SvPV_set(av, (char*)ary);
+           AvARRAY(av) = ary;
        }
     }
     AvFILLp(av) = 1;