summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-24 19:32:11 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-24 19:32:11 +0000
commit064cf52948e2ac0b1b809d55fe1b456a0b0fa4c4 (patch)
treed8bf87aad337091a0db535b3c109f1c77b857e62 /sv.h
parent2892acdbbc776bf121eaec9d93ea404f7afc54b8 (diff)
downloadperl-064cf52948e2ac0b1b809d55fe1b456a0b0fa4c4.tar.gz
Avoid special case SvMAGIC macros just to cope with Perl_sv_unmagic.
p4raw-id: //depot/perl@27319
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/sv.h b/sv.h
index b4926c0560..102c79031d 100644
--- a/sv.h
+++ b/sv.h
@@ -990,20 +990,11 @@ in gv.h: */
# define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur)
# ifdef DEBUGGING
-# ifdef PERL_IN_SV_C
-/* Can't make this RVALUE because of Perl_sv_unmagic. */
-# define SvMAGIC(sv) (*(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_u.xmg_magic))
-# else
-# define SvMAGIC(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_u.xmg_magic))
-# endif
-# define SvSTASH(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_stash))
+# define SvMAGIC(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_u.xmg_magic))
+# define SvSTASH(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_stash))
# else
-# ifdef PERL_IN_SV_C
-# define SvMAGIC(sv) ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic
-# else
-# define SvMAGIC(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic)
-# endif
-# define SvSTASH(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_stash)
+# define SvMAGIC(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic)
+# define SvSTASH(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_stash)
# endif
#else
# define SvPVX(sv) ((sv)->sv_u.svu_pv)