summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-31 20:19:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-31 20:19:34 +0000
commitd41ff1b8ad987cfcb928deba4254681c1a4c0e36 (patch)
tree1fe5e3007d4c0adad93b501f54394bf383983d52 /mg.c
parent426c1a18afb84430666a6b4f0111dbc3205bd349 (diff)
downloadperl-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 'mg.c')
-rw-r--r--mg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mg.c b/mg.c
index 3ba3d08883..f0c3bf3d8c 100644
--- a/mg.c
+++ b/mg.c
@@ -567,6 +567,9 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
sv_setiv(sv, (IV)PL_basetime);
#endif
break;
+ case '\025': /* ^U */
+ sv_setiv(sv, (IV)PL_bigchar);
+ break;
case '\027': /* ^W & $^Warnings*/
if (*(mg->mg_ptr+1) == '\0')
sv_setiv(sv, (IV)((PL_dowarn & G_WARN_ON) ? TRUE : FALSE));
@@ -1707,6 +1710,9 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
PL_basetime = (Time_t)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
#endif
break;
+ case '\025': /* ^U */
+ PL_bigchar = SvTRUE(sv);
+ break;
case '\027': /* ^W & $^Warnings */
if (*(mg->mg_ptr+1) == '\0') {
if ( ! (PL_dowarn & G_WARN_ALL_MASK)) {