summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-04-10 16:37:36 -0500
committerNicholas Clark <nick@ccl4.org>2005-04-12 09:19:43 +0000
commit607fa7f26ce8e3518faf053c2dbf72e6a35ee9b9 (patch)
tree4a3769ed4a2d78196347561c2a38cd5b552e84d9 /sv.h
parentf398eb67d321bfe2b4dd05cb57fa3c94a3337abc (diff)
downloadperl-607fa7f26ce8e3518faf053c2dbf72e6a35ee9b9.tar.gz
Refactoring to Sv*_set() macros - patch #3
Message-ID: <20050411023736.GB9355@mccoy.peters.homeunix.org> (with correction to SvUV_set) p4raw-id: //depot/perl@24229
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sv.h b/sv.h
index 90c62aa267..07a02969a2 100644
--- a/sv.h
+++ b/sv.h
@@ -780,6 +780,9 @@ in gv.h: */
#define SvPV_set(sv, val) \
STMT_START { assert(SvTYPE(sv) >= SVt_PV); \
(SvPVX(sv) = (val)); } STMT_END
+#define SvUV_set(sv, val) \
+ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
+ (((XPVUV*)SvANY(sv))->xuv_uv = (val)); } STMT_END
#define SvCUR_set(sv, val) \
STMT_START { assert(SvTYPE(sv) >= SVt_PV); \
(SvCUR(sv) = (val)); } STMT_END