Tcl Source Code

Check-in [66a24e0413]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [293344d4f3]: Regression in SQLite test-suite. Long-standing bug in implementation of TclUtfToUniChar() macro.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 66a24e04138715700328ca8bcda6d3f9325c1ae9
User & Date: jan.nijtmans 2017-07-13 15:03:27
Context
2017-07-17
08:01
Fix [fb2208172c]: tclIndex varies across builds from auto_m... check-in: cb7edbc60b user: jan.nijtmans tags: core-8-5-branch
2017-07-14
14:21
stability fix: try to avoid segfault using released object, in error case of Tcl_ObjSetVar2, if newV... Leaf check-in: bc5e7bdafc user: sebres tags: fix-8-5-578155d5a19b348d
2017-07-13
15:06
Fix [293344d4f3]: Regression in SQLite test-suite. Long-standing bug in implementation of TclUtfToUn... check-in: 65f2f760e4 user: jan.nijtmans tags: core-8-6-branch
15:03
Fix [293344d4f3]: Regression in SQLite test-suite. Long-standing bug in implementation of TclUtfToUn... check-in: 66a24e0413 user: jan.nijtmans tags: core-8-5-branch
2017-07-03
09:15
tclPathObj: fixed TclJoinPath (backported from 8.6) - usage of released object and object leakage. c... check-in: 9fc5b82feb user: sebres tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclInt.h.

3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
 *
 * MODULE_SCOPE int	TclUtfToUniChar(const char *string, Tcl_UniChar *ch);
 *----------------------------------------------------------------
 */

#define TclUtfToUniChar(str, chPtr) \
	((((unsigned char) *(str)) < 0xC0) ?		\
	    ((*(chPtr) = (Tcl_UniChar) *(str)), 1)	\
	    : Tcl_UtfToUniChar(str, chPtr))

/*
 *----------------------------------------------------------------
 * Macro that encapsulates the logic that determines when it is safe to
 * interpret a string as a byte array directly. In summary, the object must be
 * a byte array and must not have a string representation (as the operations







|







3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
 *
 * MODULE_SCOPE int	TclUtfToUniChar(const char *string, Tcl_UniChar *ch);
 *----------------------------------------------------------------
 */

#define TclUtfToUniChar(str, chPtr) \
	((((unsigned char) *(str)) < 0xC0) ?		\
	    ((*(chPtr) = (unsigned char) *(str)), 1)	\
	    : Tcl_UtfToUniChar(str, chPtr))

/*
 *----------------------------------------------------------------
 * Macro that encapsulates the logic that determines when it is safe to
 * interpret a string as a byte array directly. In summary, the object must be
 * a byte array and must not have a string representation (as the operations