This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Restore SvEND_set
authorNicholas Clark <nick@ccl4.org>
Tue, 19 Apr 2005 20:55:24 +0000 (20:55 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 19 Apr 2005 20:55:24 +0000 (20:55 +0000)
p4raw-id: //depot/perl@24253

sv.h

diff --git a/sv.h b/sv.h
index d1cb725..940355e 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -818,6 +818,9 @@ in gv.h: */
 #define SvLEN_set(sv, val) \
        STMT_START { assert(SvTYPE(sv) >= SVt_PV); \
                (((XPV*)  SvANY(sv))->xpv_len = (val)); } STMT_END
+#define SvEND_set(sv, val) \
+       STMT_START { assert(SvTYPE(sv) >= SVt_PV); \
+               (SvCUR(sv) = (val) - SvPVX(sv)); } STMT_END
 
 #define SvPV_renew(sv,n) \
        STMT_START { SvLEN_set(sv, n); \