diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-02-24 18:44:41 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-02-24 18:44:41 +0000 |
commit | db79b45b3c913399aef4d2f3647453e63c4772a8 (patch) | |
tree | 8f017949a97d258ab9bf69382ed306017ae5d7f4 /sv.h | |
parent | 8fde6460a7cb90e344d87e1652b5fa8d61c68699 (diff) | |
download | perl-db79b45b3c913399aef4d2f3647453e63c4772a8.tar.gz |
Patching magic from Inaba-san's keyboard: fix for [perl #8769]:
"scalar upgraded to UTF-8 as a side effect of quote-interpolation
when 'use encoding' is engaged"-- wasn't actually encoding's fault.
p4raw-id: //depot/perl@18764
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1102,6 +1102,17 @@ otherwise. #define sv_pvn_force(sv, lp) sv_pvn_force_flags(sv, lp, SV_GMAGIC) #define sv_utf8_upgrade(sv) sv_utf8_upgrade_flags(sv, SV_GMAGIC) +/* Should be named SvCatPVN_utf8_upgrade? */ +#define sv_catpvn_utf8_upgrade(dsv, sstr, slen, nsv) \ + STMT_START { \ + if (!(nsv)) \ + nsv = sv_2mortal(newSVpvn(sstr, slen)); \ + else \ + sv_setpvn(nsv, sstr, slen); \ + SvUTF8_off(nsv); \ + sv_utf8_upgrade(nsv); \ + sv_catsv(dsv, nsv); \ + } STMT_END /* =for apidoc Am|SV*|newRV_inc|SV* sv @@ -1199,6 +1210,7 @@ Returns a pointer to the character buffer. #define SvSetMagicSV_nosteal(dst,src) \ SvSetSV_nosteal_and(dst,src,SvSETMAGIC(dst)) + #if !defined(SKIP_DEBUGGING) #define SvPEEK(sv) sv_peek(sv) #else |