Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-11-25 20:35 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (690 votes), past polls