diff options
author | Steve Peters <steve@fisharerojo.org> | 2005-04-10 16:37:36 -0500 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-04-12 09:19:43 +0000 |
commit | 607fa7f26ce8e3518faf053c2dbf72e6a35ee9b9 (patch) | |
tree | 4a3769ed4a2d78196347561c2a38cd5b552e84d9 /sv.h | |
parent | f398eb67d321bfe2b4dd05cb57fa3c94a3337abc (diff) | |
download | perl-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |