Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Perl Strings != C strings?

by aitap (Deacon)
on Aug 24, 2012 at 19:43 UTC ( #989628=note: print w/ replies, xml ) Need Help??


in reply to Perl Strings != C strings?

Do you mean XS code? If so, perlapi:

newSVpv Creates a new SV and copies a string into it. The reference count for the SV is set to 1. If "len" is zero, Perl will compute the length using strlen(). For efficiency, consider using "newSVpvn" instead.
SV* newSVpv(const char *const s, const STRLEN len)

This creates a Perl scalar value from C string.
Sorry if my advice was wrong.


Comment on Re: Perl Strings != C strings?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-08-31 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls