summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-05-18 09:25:26 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 18:09:26 -0700
commit54c554f38309fa055396f28507f661ae9fbdde5e (patch)
tree58e678942734bdeec4f8af91c5c19da0ee60c15a /sv.h
parent9299023c08583d1430e423584af75641cf0e1513 (diff)
downloadperl-54c554f38309fa055396f28507f661ae9fbdde5e.tar.gz
sv.h: define SvAMAGIC in terms of HvAMAGIC
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/sv.h b/sv.h
index 8d09ccbd09..10988e8879 100644
--- a/sv.h
+++ b/sv.h
@@ -880,19 +880,17 @@ in gv.h: */
#define SvRMAGICAL_off(sv) (SvFLAGS(sv) &= ~SVs_RMG)
#define SvAMAGIC(sv) (SvROK(sv) && SvOBJECT(SvRV(sv)) && \
- SvFLAGS(SvSTASH(SvRV(sv))) & SVf_AMAGIC)
+ HvAMAGIC(SvSTASH(SvRV(sv))))
#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
# define SvAMAGIC_on(sv) ({ SV * const kloink = sv; \
assert(SvROK(kloink)); \
if (SvOBJECT(SvRV(kloink))) \
- SvFLAGS(SvSTASH(SvRV(kloink))) \
- |= SVf_AMAGIC; \
+ HvAMAGIC_on(SvSTASH(SvRV(kloink))); \
})
# define SvAMAGIC_off(sv) ({ SV * const kloink = sv; \
if(SvROK(kloink) \
&& SvOBJECT(SvRV(kloink))) \
- SvFLAGS(SvSTASH(SvRV(kloink))) \
- &= ~SVf_AMAGIC; \
+ HvAMAGIC_off(SvSTASH(SvRV(kloink))); \
})
#else
# define SvAMAGIC_on(sv) \