diff options
Diffstat (limited to 'pod/perlapi.pod')
-rw-r--r-- | pod/perlapi.pod | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/pod/perlapi.pod b/pod/perlapi.pod index b7cb7b30d0..8546d4f6df 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -1512,7 +1512,11 @@ variable C<PL_na>, though this is rather less efficient than using a local variable. Remember though, that hash keys in perl are free to contain embedded nulls, so using C<strlen()> or similar is not a good way to find the length of hash keys. This is very similar to the C<SvPV()> macro -described elsewhere in this document. +described elsewhere in this document. See also C<HeUTF8>. + +If you are using C<HePV> to get values to pass to C<newSVpvn()> to create a +new SV, you should consider using C<newSVhek(HeKEY_hek(he))> as it is more +efficient. char* HePV(HE* he, STRLEN len) @@ -1553,6 +1557,20 @@ C<SV*>. =for hackers Found in file hv.h +=item HeUTF8 +X<HeUTF8> + +Returns whether the C<char *> value returned by C<HePV> is encoded in UTF-8, +doing any necessary dereferencing of possibly C<SV*> keys. The value returned +will be 0 or non-0, not necesarily 1 (or even a value with any low bits set), +so B<do not> blindly assign this to a C<bool> variable, as C<bool> may be a +typedef for C<char>. + + char* HeUTF8(HE* he, STRLEN len) + +=for hackers +Found in file hv.h + =item HeVAL X<HeVAL> |