summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2004-12-13 17:26:46 +0000
committerSteve Hay <SteveHay@planit.com>2004-12-13 17:26:46 +0000
commitbc96cb06440195f187b8bc57e25fdf1757da084e (patch)
tree5e2630479950dfab2e6563543559c8eaa2d302d9 /gv.c
parentc9463f45fe9c03847ac7230d0248f3c25eb914e6 (diff)
downloadperl-bc96cb06440195f187b8bc57e25fdf1757da084e.tar.gz
Document gv_stashpvn
This is already in the API supported by Devel::PPPort, and is more efficient than gv_stashpv if the length is already known. p4raw-id: //depot/perl@23644
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index 937e0d6f88..a34df79d4e 100644
--- a/gv.c
+++ b/gv.c
@@ -576,9 +576,9 @@ S_require_errno(pTHX_ GV *gv)
=for apidoc gv_stashpv
Returns a pointer to the stash for a specified package. C<name> should
-be a valid UTF-8 string. If C<create> is set then the package will be
-created if it does not already exist. If C<create> is not set and the
-package does not exist then NULL is returned.
+be a valid UTF-8 string and must be null-terminated. If C<create> is set
+then the package will be created if it does not already exist. If C<create>
+is not set and the package does not exist then NULL is returned.
=cut
*/
@@ -589,6 +589,18 @@ Perl_gv_stashpv(pTHX_ const char *name, I32 create)
return gv_stashpvn(name, strlen(name), create);
}
+/*
+=for apidoc gv_stashpvn
+
+Returns a pointer to the stash for a specified package. C<name> should
+be a valid UTF-8 string. The C<namelen> parameter indicates the length of
+the C<name>, in bytes. If C<create> is set then the package will be
+created if it does not already exist. If C<create> is not set and the
+package does not exist then NULL is returned.
+
+=cut
+*/
+
HV*
Perl_gv_stashpvn(pTHX_ const char *name, U32 namelen, I32 create)
{