diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-09-28 08:47:07 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-09-28 11:00:19 -0700 |
commit | cffb36981555111f364a511fb5763f65ea748c0e (patch) | |
tree | 93e5a57f9fc7ea352ed4352ea3fa168a50e2c94f /sv.h | |
parent | e45e19666b263919849d25adcf99e39712aa36be (diff) | |
download | perl-cffb36981555111f364a511fb5763f65ea748c0e.tar.gz |
[perl #77928] Glob slot assignment and set-magic
Stop set-magic from being called after ref-to-glob assignment.
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -1945,9 +1945,23 @@ Returns a pointer to the character buffer. SvSetSV_nosteal_and(dst,src,/*nothing*/;) #define SvSetMagicSV(dst,src) \ - SvSetSV_and(dst,src,SvSETMAGIC(dst)) + SvSetSV_and(dst,src, \ + if (SvSMAGICAL(dst) \ + && ( \ + !isGV_with_GP(dst) || !SvROK(src) || isGV_with_GP(SvRV(src)) \ + ) \ + ) \ + mg_set(dst) \ + ) #define SvSetMagicSV_nosteal(dst,src) \ - SvSetSV_nosteal_and(dst,src,SvSETMAGIC(dst)) + SvSetSV_nosteal_and(dst,src, \ + if (SvSMAGICAL(dst) \ + && ( \ + !isGV_with_GP(dst) || !SvROK(src) || isGV_with_GP(SvRV(src)) \ + ) \ + ) \ + mg_set(dst) \ + ) #if !defined(SKIP_DEBUGGING) |