develooper Front page | perl.perl5.porters | Postings from January 2004

a new newSV macro around sv_usepvn?

From:
Stas Bekman
Date:
January 28, 2004 14:32
Subject:
a new newSV macro around sv_usepvn?
Message ID:
40182EB1.30101@stason.org
something like that? Notice s/const char *s/char *s/ as sv_usepvn accepts 
'char */.

/*
=for apidoc newSVpvn_nocopy

Creates a new SV without copying a string into it.  The reference
count for the SV is set to 1. Make sure to read the sv_usepvn entry,
which is used by this function.

=cut
*/

SV *
Perl_newSVpvn_nocopy(pTHX_ char *s, STRLEN len)
{
     register SV *sv;

     new_SV(sv);
     sv_usepvn(sv,s,len);
     return sv;
}


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About