Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

PerlApi question

by Anonymous Monk
on Jun 01, 2007 at 00:29 UTC ( [id://618609]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Why do the SvPV???() calls require a length parameter?

I thought that the point of SVs is that they know how long any PV is?

Replies are listed 'Best First'.
Re: PerlApi question
by dave_the_m (Monsignor) on Jun 01, 2007 at 00:56 UTC
    The SvPV*() calls set the length variable rather than read it.

    Dave.

Re: PerlApi question
by Fletch (Bishop) on Jun 01, 2007 at 00:47 UTC

    Yes, SvPV* values do; however char * values don't and could possily contain NULs. If you're going back and forth between them you need to know how big they are (or Perl will).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://618609]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-25 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found