mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
pp_multiconcat: use the new AMGf_force_scalar
instead of a special case in amagic_call()
This commit is contained in:
parent
46a4ed5f61
commit
c93bd38fcc
3
gv.c
3
gv.c
@ -4154,8 +4154,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
|
||||
* with the context of individual concats being scalar,
|
||||
* regardless of the overall context of the multiconcat op
|
||||
*/
|
||||
U8 gimme = (force_scalar || (flags & AMGf_force_scalar)
|
||||
|| !PL_op || PL_op->op_type == OP_MULTICONCAT)
|
||||
U8 gimme = (force_scalar || (flags & AMGf_force_scalar) || !PL_op )
|
||||
? G_SCALAR : GIMME_V;
|
||||
|
||||
CATCH_SET(TRUE);
|
||||
|
||||
3
pp_hot.c
3
pp_hot.c
@ -1377,7 +1377,8 @@ PP(pp_multiconcat)
|
||||
)
|
||||
{
|
||||
SV * const tmpsv = amagic_call(left, right, concat_amg,
|
||||
(nextappend ? AMGf_assign: 0));
|
||||
(nextappend ? AMGf_assign: 0)
|
||||
| AMGf_force_scalar);
|
||||
if (tmpsv) {
|
||||
/* NB: tryAMAGICbin_MG() includes an OPpTARGET_MY test
|
||||
* here, which isn't needed as any implicit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user