From 672994ceae26eaea7b543577cbf4ae1bf28d2934 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Sun, 8 May 2005 15:49:17 -0500 Subject: Sv_*set() doc's and extra const's for the SvPVX_const() tasks Message-ID: <20050509014917.GA24132@mccoy.peters.homeunix.org> p4raw-id: //depot/perl@24422 --- sv.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'sv.h') diff --git a/sv.h b/sv.h index 869cd422b5..8b1a5d2995 100644 --- a/sv.h +++ b/sv.h @@ -535,8 +535,32 @@ See C. Access the character as *(SvEND(sv)). =for apidoc Am|HV*|SvSTASH|SV* sv Returns the stash of the SV. +=for apidoc Am|void|SvIV_set|SV* sv|IV val +Set the value of the IV pointer in sv to val. + +=for apidoc Am|void|SvNV_set|SV* sv|NV val +Set the value of the IV pointer in sv to val. + +=for apidoc Am|void|SvPV_set|SV* sv|char* val +Set the value of the PV pointer in sv to val. + +=for apidoc Am|void|SvUV_set|SV* sv|UV val +Set the value of the PV pointer in sv to val. + +=for apidoc Am|void|SvRV_set|SV* sv|SV* val +Set the value of the RV pointer in sv to val. + +=for apidoc Am|void|SvMAGIC_set|SV* sv|MAGIC* val +Set the value of the MAGIC pointer in sv to val. + +=for apidoc Am|void|SvSTASH_set|SV* sv|STASH* val +Set the value of the STASH pointer in sv to val. + =for apidoc Am|void|SvCUR_set|SV* sv|STRLEN len -Set the length of the string which is in the SV. See C. +Set the current length of the string which is in the SV. See C. + +=for apidoc Am|void|SvLEN_set|SV* sv|STRLEN len +Set the actual length of the string which is in the SV. =cut */ @@ -854,6 +878,8 @@ in gv.h: */ } \ } STMT_END +#define SvPVX_const(sv) ((const char*)SvPVX(sv)) + #define BmRARE(sv) ((XPVBM*) SvANY(sv))->xbm_rare #define BmUSEFUL(sv) ((XPVBM*) SvANY(sv))->xbm_useful #define BmPREVIOUS(sv) ((XPVBM*) SvANY(sv))->xbm_previous -- cgit v1.2.1