summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-25 09:32:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-25 09:32:13 (GMT)
commit53e89dcb06d57874c1fd1aff0bca30a01f351cc0 (patch)
tree4e258563dbd69db853bfaa850d7a82737c432960 /generic/tclInt.h
parent6de32c896abb44a00ad7368892924e9c9de5db11 (diff)
parentd3eb8cf5e3d7b1535ba73e95dee737c08a36d3bb (diff)
downloadtcl-53e89dcb06d57874c1fd1aff0bca30a01f351cc0.zip
tcl-53e89dcb06d57874c1fd1aff0bca30a01f351cc0.tar.gz
tcl-53e89dcb06d57874c1fd1aff0bca30a01f351cc0.tar.bz2
Fix compiled "string is <class>" for characters > U+FFFF. Add testcase exposing this bug.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index f9cc6f3..f7b3cc4 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3252,11 +3252,13 @@ MODULE_SCOPE int TclUtfCasecmp(const char *cs, const char *ct);
MODULE_SCOPE int TclUtfCount(int ch);
#if TCL_UTF_MAX > 3
# define TclUtfToUCS4 Tcl_UtfToUniChar
+# define TclUniCharToUCS4(src, ptr) (*ptr = *(src),1)
# define TclUCS4Complete Tcl_UtfCharComplete
# define TclChar16Complete(src, length) (((unsigned)((unsigned char)*(src) - 0xF0) < 5) \
? ((length) >= 3) : Tcl_UtfCharComplete((src), (length)))
#else
MODULE_SCOPE int TclUtfToUCS4(const char *src, int *ucs4Ptr);
+ MODULE_SCOPE int TclUniCharToUCS4(const Tcl_UniChar *src, int *ucs4Ptr);
# define TclUCS4Complete(src, length) (((unsigned)((unsigned char)*(src) - 0xF0) < 5) \
? ((length) >= 4) : Tcl_UtfCharComplete((src), (length)))
# define TclChar16Complete Tcl_UtfCharComplete