diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm index 4453a8d48e65..f84a294ba966 100644 --- a/dist/threads/lib/threads.pm +++ b/dist/threads/lib/threads.pm @@ -5,7 +5,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '2.26'; # remember to update version in POD! +our $VERSION = '2.27'; # remember to update version in POD! my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -134,7 +134,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 2.26 +This document describes threads version 2.27 =head1 WARNING diff --git a/dist/threads/threads.xs b/dist/threads/threads.xs index e544ebad2fb0..c99b3731e224 100644 --- a/dist/threads/threads.xs +++ b/dist/threads/threads.xs @@ -46,6 +46,10 @@ # define CLANG_DIAG_RESTORE_DECL CLANG_DIAG_RESTORE dNOOP #endif +#ifndef G_LIST +# define G_LIST G_ARRAY +#endif + #ifdef USE_ITHREADS #ifdef __amigaos4__ @@ -1115,7 +1119,7 @@ ithread_create(...) case 'A': case 'l': case 'L': - context = G_ARRAY; + context = G_LIST; break; case 's': case 'S': @@ -1130,11 +1134,11 @@ ithread_create(...) } } else if ((svp = hv_fetchs(specs, "array", 0))) { if (SvTRUE(*svp)) { - context = G_ARRAY; + context = G_LIST; } } else if ((svp = hv_fetchs(specs, "list", 0))) { if (SvTRUE(*svp)) { - context = G_ARRAY; + context = G_LIST; } } else if ((svp = hv_fetchs(specs, "scalar", 0))) { if (SvTRUE(*svp)) { @@ -1156,7 +1160,7 @@ ithread_create(...) if (context == -1) { context = GIMME_V; /* Implicit context */ } else { - context |= (GIMME_V & (~(G_ARRAY|G_SCALAR|G_VOID))); + context |= (GIMME_V & (~(G_LIST|G_SCALAR|G_VOID))); } /* Create thread */ @@ -1201,7 +1205,7 @@ ithread_list(...) classname = (char *)SvPV_nolen(ST(0)); /* Calling context */ - list_context = (GIMME_V == G_ARRAY); + list_context = (GIMME_V == G_LIST); /* Running or joinable parameter */ if (items > 1) { @@ -1726,9 +1730,9 @@ ithread_wantarray(...) CODE: PERL_UNUSED_VAR(items); thread = S_SV_to_ithread(aTHX_ ST(0)); - ST(0) = ((thread->gimme & G_WANT) == G_ARRAY) ? &PL_sv_yes : - ((thread->gimme & G_WANT) == G_VOID) ? &PL_sv_undef - /* G_SCALAR */ : &PL_sv_no; + ST(0) = ((thread->gimme & G_WANT) == G_LIST) ? &PL_sv_yes : + ((thread->gimme & G_WANT) == G_VOID) ? &PL_sv_undef + /* G_SCALAR */ : &PL_sv_no; /* XSRETURN(1); - implied */