Skip to content

Commit 13ed11e

Browse files
committed
pp_multiconcat: use the new AMGf_force_scalar
instead of a special case in amagic_call()
1 parent 18a1234 commit 13ed11e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4154,8 +4154,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
41544154
* with the context of individual concats being scalar,
41554155
* regardless of the overall context of the multiconcat op
41564156
*/
4157-
U8 gimme = (force_scalar || (flags & AMGf_force_scalar)
4158-
|| !PL_op || PL_op->op_type == OP_MULTICONCAT)
4157+
U8 gimme = (force_scalar || (flags & AMGf_force_scalar) || !PL_op )
41594158
? G_SCALAR : GIMME_V;
41604159

41614160
CATCH_SET(TRUE);

pp_hot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,8 @@ PP(pp_multiconcat)
13771377
)
13781378
{
13791379
SV * const tmpsv = amagic_call(left, right, concat_amg,
1380-
(nextappend ? AMGf_assign: 0));
1380+
(nextappend ? AMGf_assign: 0)
1381+
| AMGf_force_scalar);
13811382
if (tmpsv) {
13821383
/* NB: tryAMAGICbin_MG() includes an OPpTARGET_MY test
13831384
* here, which isn't needed as any implicit

0 commit comments

Comments
 (0)