PERLVAR(Iutf8_idstart, SV *)
PERLVAR(Iutf8_idcont, SV *)
+PERLVAR(Isort_RealCmp, SVCOMPARE_t)
+
/* New variables must be added to the very end for binary compatibility.
* XSUB.h provides wrapper functions via perlapi.h that make this
* irrelevant, but not all code may be expected to #include XSUB.h. */
* dictated by the indirect array.
*/
-static SVCOMPARE_t RealCmp;
static I32
cmpindir(pTHX_ gptr a, gptr b)
gptr *ap = (gptr *)a;
gptr *bp = (gptr *)b;
- if ((sense = RealCmp(aTHX_ *ap, *bp)) == 0)
+ if ((sense = PL_sort_RealCmp(aTHX_ *ap, *bp)) == 0)
sense = (ap > bp) ? 1 : ((ap < bp) ? -1 : 0);
return sense;
}
/* Copy pointers to original array elements into indirect array */
for (n = nmemb, pp = indir, q = list1; n--; ) *pp++ = q++;
- savecmp = RealCmp; /* Save current comparison routine, if any */
- RealCmp = cmp; /* Put comparison routine where cmpindir can find it */
+ savecmp = PL_sort_RealCmp; /* Save current comparison routine, if any */
+ PL_sort_RealCmp = cmp; /* Put comparison routine where cmpindir can find it */
/* sort, with indirection */
S_qsortsvu(aTHX_ (gptr *)indir, nmemb, cmpindir);
/* free iff allocated */
if (indir != small) { Safefree(indir); }
/* restore prevailing comparison routine */
- RealCmp = savecmp;
+ PL_sort_RealCmp = savecmp;
} else {
S_qsortsvu(aTHX_ list1, nmemb, cmp);
}