s |I32 |sortcv |NN SV *a|NN SV *b
s |I32 |sortcv_xsub |NN SV *a|NN SV *b
s |I32 |sortcv_stacked |NN SV *a|NN SV *b
+s |void |qsortsvu |NN SV** array|size_t num_elts|NN SVCOMPARE_t compare
#endif
#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)
#define sortcv S_sortcv
#define sortcv_xsub S_sortcv_xsub
#define sortcv_stacked S_sortcv_stacked
+#define qsortsvu S_qsortsvu
#endif
#endif
#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)
#define sortcv(a,b) S_sortcv(aTHX_ a,b)
#define sortcv_xsub(a,b) S_sortcv_xsub(aTHX_ a,b)
#define sortcv_stacked(a,b) S_sortcv_stacked(aTHX_ a,b)
+#define qsortsvu(a,b,c) S_qsortsvu(aTHX_ a,b,c)
#endif
#endif
#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)
PL_sort_RealCmp = cmp; /* Put comparison routine where cmpindir can find it */
/* sort, with indirection */
- S_qsortsvu(aTHX_ (gptr *)indir, nmemb,
- ((flags & SORTf_DESC) != 0 ? cmpindir_desc : cmpindir));
+ if (flags & SORTf_DESC)
+ qsortsvu((gptr *)indir, nmemb, cmpindir_desc);
+ else
+ qsortsvu((gptr *)indir, nmemb, cmpindir);
pp = indir;
q = list1;
const SVCOMPARE_t savecmp = PL_sort_RealCmp; /* Save current comparison routine, if any */
PL_sort_RealCmp = cmp; /* Put comparison routine where cmp_desc can find it */
cmp = cmp_desc;
- S_qsortsvu(aTHX_ list1, nmemb, cmp);
+ qsortsvu(list1, nmemb, cmp);
/* restore prevailing comparison routine */
PL_sort_RealCmp = savecmp;
} else {
- S_qsortsvu(aTHX_ list1, nmemb, cmp);
+ qsortsvu(list1, nmemb, cmp);
}
}
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
+STATIC void S_qsortsvu(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t compare)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_3);
+
#endif
#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)