allow new style sort subs to work under usethreads
authorGurusamy Sarathy <gsar@cpan.org>
Thu, 9 Dec 1999 10:21:53 +0000 (10:21 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Thu, 9 Dec 1999 10:21:53 +0000 (10:21 +0000)
p4raw-id: //depot/perl@4674

pp_ctl.c

index 786a08d..feec363 100644 (file)
--- 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);