[Kc] feeling bad about wasting time with things that are right there in the manuals

David Nicol davidnicol at gmail.com
Wed Jun 8 16:17:31 PDT 2005

In the SvPV macro, the length of the string returned is placed into
the variable len (this is a macro, so you do not use &len). If you do
not care what the length of the data is, use the SvPV_nolen macro.
Historically the SvPV macro with the global variable PL_na has been
used in this case. But that can be quite inefficient because PL_na
must be accessed in thread-local storage in threaded Perl. In any
case, remember that Perl allows arbitrary strings of data that may
both contain NULs and might not be terminated by a NUL.
David L Nicol
"A rhinoceros, going full tilt on the opposite pavement!" -- Ionesco

More information about the kc mailing list