summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-19 20:30:24 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-19 20:30:24 +0000
commit675eb423df17d2e0babef81ea90dfb8da9bed761 (patch)
treeb7302e05a1b8b7b8df4ac7411a8137f38ac9cce6 /sv.h
parent05ef5f8f807e05aa6ac8d4f78bb7f33dd4496cdb (diff)
downloadperl-675eb423df17d2e0babef81ea90dfb8da9bed761.tar.gz
AVs and HVs don't have IVXs or NVXs, so assert this too.
p4raw-id: //depot/perl@27230
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index ae1c26d549..d3ce22f5f3 100644
--- a/sv.h
+++ b/sv.h
@@ -907,16 +907,22 @@ in gv.h: */
# define SvIVX(sv) \
(*({ SV *const _svi = (SV *) sv; \
assert(SvTYPE(_svi) == SVt_IV || SvTYPE(_svi) >= SVt_PVIV); \
+ assert(SvTYPE(_svi) != SVt_PVAV); \
+ assert(SvTYPE(_svi) != SVt_PVHV); \
&(((XPVIV*) SvANY(_svi))->xiv_iv); \
}))
# define SvUVX(sv) \
(*({ SV *const _svi = (SV *) sv; \
assert(SvTYPE(_svi) == SVt_IV || SvTYPE(_svi) >= SVt_PVIV); \
+ assert(SvTYPE(_svi) != SVt_PVAV); \
+ assert(SvTYPE(_svi) != SVt_PVHV); \
&(((XPVUV*) SvANY(_svi))->xuv_uv); \
}))
# define SvNVX(sv) \
(*({ SV *const _svi = (SV *) sv; \
- assert(SvTYPE(_svi) == SVt_NV || SvTYPE(_svi) >= SVt_PVNV); \
+ assert(SvTYPE(_svi) == SVt_NV || SvTYPE(_svi) >= SVt_PVNV); \
+ assert(SvTYPE(_svi) != SVt_PVAV); \
+ assert(SvTYPE(_svi) != SVt_PVHV); \
&(((XPVNV*) SvANY(_svi))->xnv_nv); \
}))
# define SvMAGIC(sv) \