diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-08-17 14:21:37 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-08-21 16:51:16 -0700 |
commit | 35e035ccb58e33947405288b1177fb0b9c1da197 (patch) | |
tree | fec171998002fc9523f006c88610f31e252d5d5f /sv.h | |
parent | db4cf31d1d6c1d09bce93986aa993818ea7b17cf (diff) | |
download | perl-35e035ccb58e33947405288b1177fb0b9c1da197.tar.gz |
More PAD APIs
If we are making padlists their own type, and no longer AVs, it makes
sense to add APIs for pads, too, so that CPAN code that needs to
change now will only have to change once if we ever stop pads them-
selves from being AVs.
There is no reason pad names have to be SVs, so I am adding sep-
arate APIs for pad names, too. The AV containing pad names is
now officially a PADNAMELIST, which is accessed, not via
*PADLIST_ARRAY(padlist), but via PADLIST_NAMES(padlist).
Future optimisations may even merge the padlist with its name list so
I have also added macros to access the parts of the name list directly
from the padlist.
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1998,6 +1998,18 @@ C<SvUTF8_on> on the new SV. Implemented as a wrapper around C<newSVpvn_flags>. #define newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0) /* +=for apidoc Amx|SV*|newSVpadname|PADNAME *pn + +Creates a new SV containing the pad name. This is currently identical +to C<newSVsv>, but pad names may cease being SVs at some point, so +C<newSVpadname> is preferable. + +=cut +*/ + +#define newSVpadname(pn) newSVsv(pn) + +/* =for apidoc Am|void|SvOOK_offset|NN SV*sv|STRLEN len Reads into I<len> the offset from SvPVX back to the true start of the |