summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-08-14 13:56:56 +0200
committerYves Orton <demerphq@gmail.com>2016-08-14 13:57:18 +0200
commitcb198164564566deec7e26370654b1378a1a5f1d (patch)
tree0697d35227660c3c3e2a88b9833783186e10b412 /sv.h
parent48c0e89d40bfde5337dd013112467554427c1279 (diff)
downloadperl-cb198164564566deec7e26370654b1378a1a5f1d.tar.gz
first step to documenting the Internals namespace
After discussion, we have decided to document Internals. This is a first step doing so, with lib/Internals.pod. At the same time I updated sv.h that there were equivalents for SvREFCNT and SvREADONLY in the Internals namespace, this required adding docs for SvREADONLY. I also tweaked the test name in Porting/Maintainers.pm so that it pointed at Porting/Maintainers.pl to make it more obvious how to specify a maintainer for a new file.
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index db42a66715..07719a6c08 100644
--- a/sv.h
+++ b/sv.h
@@ -269,7 +269,8 @@ struct p5rx {
=head1 SV Manipulation Functions
=for apidoc Am|U32|SvREFCNT|SV* sv
-Returns the value of the object's reference count.
+Returns the value of the object's reference count. Exposed
+to perl code via Internals::SvREFCNT().
=for apidoc Am|SV*|SvREFCNT_inc|SV* sv
Increments the reference count of the given SV, returning the SV.
@@ -1089,6 +1090,22 @@ C<sv_force_normal> does nothing.
#define SvOBJECT_on(sv) (SvFLAGS(sv) |= SVs_OBJECT)
#define SvOBJECT_off(sv) (SvFLAGS(sv) &= ~SVs_OBJECT)
+/*
+=for apidoc Am|U32|SvREADONLY|SV* sv
+Returns true if the argument is readonly, otherwise returns false.
+Exposed to to perl code via Internals::SvREADONLY().
+
+=for apidoc Am|U32|SvREADONLY_on|SV* sv
+Mark an object as readonly. Exactly what this means depends on the object
+type. Exposed to perl code via Internals::SvREADONLY().
+
+=for apidoc Am|U32|SvREADONLY_off|SV* sv
+Mark an object as not-readonly. Exactly what this mean depends on the
+object type. Exposed to perl code via Internals::SvREADONLY().
+
+=cut
+*/
+
#define SvREADONLY(sv) (SvFLAGS(sv) & (SVf_READONLY|SVf_PROTECT))
#ifdef PERL_CORE
# define SvREADONLY_on(sv) (SvFLAGS(sv) |= (SVf_READONLY|SVf_PROTECT))