summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-05-08 15:49:17 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-05-09 07:37:58 +0000
commit672994ceae26eaea7b543577cbf4ae1bf28d2934 (patch)
tree2aec51be4860d751bd77a5a41fc67ef627dbc5af /sv.h
parent3d42dc86375a150e698f9a14ae6be7a37e2ed575 (diff)
downloadperl-672994ceae26eaea7b543577cbf4ae1bf28d2934.tar.gz
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
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index 869cd422b5..8b1a5d2995 100644
--- a/sv.h
+++ b/sv.h
@@ -535,8 +535,32 @@ See C<SvCUR>. 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<SvCUR>.
+Set the current length of the string which is in the SV. See C<SvCUR>.
+
+=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