diff options
author | Father Chrysostomos <sprout@cpan.org> | 2015-01-09 08:45:28 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2015-01-31 22:03:53 -0800 |
commit | 636ac8fc9ac210e786fda679ad294c918022d0c5 (patch) | |
tree | da4fcc2499b4f943897103e8852d39ecf924cf11 /gv.c | |
parent | 594a52e669cf40aeb3e1f610fad70e3f919e8e10 (diff) | |
download | perl-636ac8fc9ac210e786fda679ad294c918022d0c5.tar.gz |
5th arg to indicate numeric bitwise overloading
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -2842,7 +2842,9 @@ Perl_try_amagic_un(pTHX_ int method, int flags) { SvGETMAGIC(arg); if (SvAMAGIC(arg) && (tmpsv = amagic_call(arg, &PL_sv_undef, method, - AMGf_noright | AMGf_unary))) { + AMGf_noright | AMGf_unary + | (flags & AMGf_numarg)))) + { if (flags & AMGf_set) { SETs(tmpsv); } @@ -2887,7 +2889,8 @@ Perl_try_amagic_bin(pTHX_ int method, int flags) { if (SvAMAGIC(left) || SvAMAGIC(right)) { SV * const tmpsv = amagic_call(left, right, method, - ((flags & AMGf_assign) && opASSIGN ? AMGf_assign: 0)); + ((flags & AMGf_assign) && opASSIGN ? AMGf_assign: 0) + | (flags & AMGf_numarg)); if (tmpsv) { if (flags & AMGf_set) { (void)POPs; @@ -3395,6 +3398,10 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags) PUSHs(newSVpvn_flags(AMG_id2name(method + assignshift), AMG_id2namelen(method + assignshift), SVs_TEMP)); } + else if (flags & AMGf_numarg) + PUSHs(&PL_sv_undef); + if (flags & AMGf_numarg) + PUSHs(&PL_sv_yes); PUSHs(MUTABLE_SV(cv)); PUTBACK; oldmark = TOPMARK; |