diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-09-09 13:02:46 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-09-09 13:02:46 +0200 |
commit | a0c4bfab72af05778cf2c62b8affc9086fae95f8 (patch) | |
tree | 53ca368e3c4ef0f28c30ae0df23a723946fac5c2 /pp_sys.c | |
parent | 6662c9a722f53ebc65b51c61fe887a2e8b6b479c (diff) | |
download | perl-a0c4bfab72af05778cf2c62b8affc9086fae95f8.tar.gz |
In pp_chdir, move SvGETMAGIC(sv) out of the if() condition.
It was added to the if() condition as part of 935647290357b277.
Unfortunately the syntax used to implemented SvGETMAGIC(sv) is considered by
gcc to be valid in an expression, but is not valid in other compilers.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -3466,14 +3466,17 @@ PP(pp_chdir) if (PL_op->op_flags & OPf_SPECIAL) { gv = gv_fetchsv(sv, 0, SVt_PVIO); } - else if (SvGETMAGIC(sv), isGV_with_GP(sv)) { - gv = MUTABLE_GV(sv); - } - else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { - gv = MUTABLE_GV(SvRV(sv)); - } else { - tmps = SvPV_nomg_const_nolen(sv); + SvGETMAGIC(sv); + if(isGV_with_GP(sv)) { + gv = MUTABLE_GV(sv); + } + else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { + gv = MUTABLE_GV(SvRV(sv)); + } + else { + tmps = SvPV_nomg_const_nolen(sv); + } } } |