Change 23644 by [EMAIL PROTECTED] on 2004/12/13 17:26:46
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.
Affected files ...
... //depot/perl/embed.fnc#139 edit
... //depot/perl/gv.c#212 edit
... //depot/perl/pod/perlapi.pod#195 edit
Differences ...
==== //depot/perl/embed.fnc#139 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#138~23612~ Mon Dec 6 05:01:36 2004
+++ perl/embed.fnc Mon Dec 13 09:26:46 2004
@@ -262,7 +262,7 @@
Ap |void |gv_init |GV* gv|HV* stash|const char* name \
|STRLEN len|int multi
Apd |HV* |gv_stashpv |const char* name|I32 create
-Ap |HV* |gv_stashpvn |const char* name|U32 namelen|I32 create
+Apd |HV* |gv_stashpvn |const char* name|U32 namelen|I32 create
Apd |HV* |gv_stashsv |SV* sv|I32 create
Apd |void |hv_clear |HV* tb
Ap |void |hv_delayfree_ent|HV* hv|HE* entry
==== //depot/perl/gv.c#212 (text) ====
Index: perl/gv.c
--- perl/gv.c#211~23623~ Tue Dec 7 07:27:09 2004
+++ perl/gv.c Mon Dec 13 09:26:46 2004
@@ -576,9 +576,9 @@
=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
*/
@@ -588,6 +588,18 @@
{
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)
==== //depot/perl/pod/perlapi.pod#195 (text+w) ====
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod#194~23567~ Tue Nov 30 04:57:30 2004
+++ perl/pod/perlapi.pod Mon Dec 13 09:26:46 2004
@@ -883,11 +883,24 @@
=item 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
+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.
+
+ HV* gv_stashpv(const char* name, I32 create)
+
+=for hackers
+Found in file gv.c
+
+=item 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.
- HV* gv_stashpv(const char* name, I32 create)
+ HV* gv_stashpvn(const char* name, U32 namelen, I32 create)
=for hackers
Found in file gv.c
End of Patch.