summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-01-29 09:32:01 -0700
committerKarl Williamson <public@khwilliamson.com>2012-01-29 10:07:40 -0700
commitb36bf33f6564c3e9a9ff131f4f3c9980b7a8af15 (patch)
treea56bfceaaf4fef2dcdc75fe42f3213cabfc586c7 /utf8.h
parentae525322937dcd92f77b4c9e9fc9d6e8f255650d (diff)
downloadperl-b36bf33f6564c3e9a9ff131f4f3c9980b7a8af15.tar.gz
utf8.h: Restore macro defn incorrectly trashed earlier
Commit 66cbab2c91fca8c9abc65a7231a053898208efe3 changed the definition of IN_UNI_8_BIT, but in so doing, lost the 2nd line of the macro; and I did not catch it. Tests will be added shortly.
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/utf8.h b/utf8.h
index dcfc68f21f..e558bb68d5 100644
--- a/utf8.h
+++ b/utf8.h
@@ -252,7 +252,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
#define IN_BYTES (CopHINTS_get(PL_curcop) & HINT_BYTES)
#define DO_UTF8(sv) (SvUTF8(sv) && !IN_BYTES)
#define IN_UNI_8_BIT \
- (CopHINTS_get(PL_curcop) & (HINT_UNI_8_BIT|HINT_LOCALE_NOT_CHARS))
+ (CopHINTS_get(PL_curcop) & (HINT_UNI_8_BIT|HINT_LOCALE_NOT_CHARS) \
+ && ! IN_LOCALE_RUNTIME && ! IN_BYTES)
+
#define UTF8_ALLOW_EMPTY 0x0001 /* Allow a zero length string */