From: Gurusamy Sarathy Date: Thu, 9 Dec 1999 10:21:53 +0000 (+0000) Subject: allow new style sort subs to work under usethreads X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4791659547914e2a20ad202d592d390047a38537;p=p5sagit%2Fp5-mst-13.2.git allow new style sort subs to work under usethreads p4raw-id: //depot/perl@4674 --- diff --git a/pp_ctl.c b/pp_ctl.c index 786a08d..feec363 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -4180,7 +4180,13 @@ sortcv_stacked(pTHXo_ SV *a, SV *b) I32 oldsaveix = PL_savestack_ix; I32 oldscopeix = PL_scopestack_ix; I32 result; - AV *av = GvAV(PL_defgv); + AV *av; + +#ifdef USE_THREADS + av = (AV*)PL_curpad[0]; +#else + av = GvAV(PL_defgv); +#endif if (AvMAX(av) < 1) { SV** ary = AvALLOC(av);