diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-02 23:41:21 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-02 23:41:21 +0000 |
commit | 740cce10afff4bec3346f61ab3d0f7bfa424948c (patch) | |
tree | 83c031300e2326e8d8ae399e088c4d3a42472a13 /embed.h | |
parent | e350b669f3dadb9da757b62a20659cbc7eca2190 (diff) | |
download | perl-740cce10afff4bec3346f61ab3d0f7bfa424948c.tar.gz |
Add a new function newSVpvn_flags(), which takes a third parameter of
flag bits. Right now the only flag bit is SVf_UTF8, which will call
SvUTF8_on() on the new SV for you. Provide a wrapper newSVpvn_utf8(),
which takes a boolean, and passes in SVf_UTF8 if that is true.
Refactor the core to use it where possible. It makes the source code
clearer and smaller, but seems to be swings and roundabouts on object
code size.
p4raw-id: //depot/perl@32807
Diffstat (limited to 'embed.h')
-rw-r--r-- | embed.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -572,7 +572,10 @@ #define newSVnv Perl_newSVnv #define newSVpv Perl_newSVpv #define newSVpvn Perl_newSVpvn +#define newSVpvn_flags Perl_newSVpvn_flags +#ifdef PERL_CORE #define newSVhek Perl_newSVhek +#endif #define newSVpvn_share Perl_newSVpvn_share #define newSVpvf Perl_newSVpvf #define vnewSVpvf Perl_vnewSVpvf @@ -2865,7 +2868,10 @@ #define newSVnv(a) Perl_newSVnv(aTHX_ a) #define newSVpv(a,b) Perl_newSVpv(aTHX_ a,b) #define newSVpvn(a,b) Perl_newSVpvn(aTHX_ a,b) +#define newSVpvn_flags(a,b,c) Perl_newSVpvn_flags(aTHX_ a,b,c) +#ifdef PERL_CORE #define newSVhek(a) Perl_newSVhek(aTHX_ a) +#endif #define newSVpvn_share(a,b,c) Perl_newSVpvn_share(aTHX_ a,b,c) #define vnewSVpvf(a,b) Perl_vnewSVpvf(aTHX_ a,b) #define newSVrv(a,b) Perl_newSVrv(aTHX_ a,b) |