diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-31 20:19:34 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-31 20:19:34 +0000 |
commit | d41ff1b8ad987cfcb928deba4254681c1a4c0e36 (patch) | |
tree | 1fe5e3007d4c0adad93b501f54394bf383983d52 /sv.h | |
parent | 426c1a18afb84430666a6b4f0111dbc3205bd349 (diff) | |
download | perl-d41ff1b8ad987cfcb928deba4254681c1a4c0e36.tar.gz |
introduce $^U, a global bit to indicate whether system
calls should using widechar APIs; chr and sprintf "%c" also
follow this flag in the absense of "use byte"; "use utf8"
sets $^U=1 (this appears kludgey)
p4raw-id: //depot/perl@4937
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -503,9 +503,10 @@ Set the length of the string which is in the SV. See C<SvCUR>. #define SvOK(sv) (SvFLAGS(sv) & SVf_OK) #define SvOK_off(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC| \ - SVf_IVisUV), \ + SVf_IVisUV|SVf_UTF8), \ SvOOK_off(sv)) -#define SvOK_off_exc_UV(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC), \ +#define SvOK_off_exc_UV(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC| \ + SVf_UTF8), \ SvOOK_off(sv)) #define SvOKp(sv) (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) @@ -547,7 +548,11 @@ Set the length of the string which is in the SV. See C<SvCUR>. #define SvPOK(sv) (SvFLAGS(sv) & SVf_POK) #define SvPOK_on(sv) (SvFLAGS(sv) |= (SVf_POK|SVp_POK)) #define SvPOK_off(sv) (SvFLAGS(sv) &= ~(SVf_POK|SVp_POK)) -#define SvPOK_only(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC|SVf_IVisUV), \ +#define SvPOK_only(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC| \ + SVf_IVisUV|SVf_UTF8), \ + SvFLAGS(sv) |= (SVf_POK|SVp_POK)) +#define SvPOK_only_UTF8(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC| \ + SVf_IVisUV), \ SvFLAGS(sv) |= (SVf_POK|SVp_POK)) #define SvOOK(sv) (SvFLAGS(sv) & SVf_OOK) |