Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989628]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2017-06-23 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (555 votes). Check out past polls.