diff options
-rw-r--r-- | generic/tclDecls.h | 8 | ||||
-rw-r--r-- | generic/tclEncoding.c | 8 | ||||
-rw-r--r-- | generic/tclStringObj.c | 4 | ||||
-rw-r--r-- | generic/tclStubInit.c | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h index d389e4e..9205401 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -3931,8 +3931,8 @@ extern const TclStubs *tclStubsPtr; ? (int (*)(const char *, wchar_t *))tclStubsPtr->tcl_UtfToUniChar \ : (int (*)(const char *, wchar_t *))Tcl_UtfToChar16) # define Tcl_WCharLen (sizeof(wchar_t) != sizeof(short) \ - ? (int (*)(wchar_t *))tclStubsPtr->tcl_UniCharLen \ - : (int (*)(wchar_t *))Tcl_Char16Len) + ? (size_t (*)(wchar_t *))tclStubsPtr->tcl_UniCharLen \ + : (size_t (*)(wchar_t *))Tcl_Char16Len) #else # define Tcl_WCharToUtfDString (sizeof(wchar_t) != sizeof(short) \ ? (char *(*)(const wchar_t *, size_t, Tcl_DString *))Tcl_UniCharToUtfDString \ @@ -3944,8 +3944,8 @@ extern const TclStubs *tclStubsPtr; ? (int (*)(const char *, wchar_t *))Tcl_UtfToUniChar \ : (int (*)(const char *, wchar_t *))Tcl_UtfToChar16) # define Tcl_WCharLen (sizeof(wchar_t) != sizeof(short) \ - ? (int (*)(wchar_t *))Tcl_UniCharLen \ - : (int (*)(wchar_t *))Tcl_Char16Len) + ? (size_t (*)(wchar_t *))Tcl_UniCharLen \ + : (size_t (*)(wchar_t *))Tcl_Char16Len) #endif /* diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 1b33ca4..3a6385f 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2736,7 +2736,7 @@ UtfToUcs2Proc( { const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd; int result, numChars; -#if TCL_UTF_MAX <= 3 +#if TCL_UTF_MAX < 4 int len; #endif Tcl_UniChar ch = 0; @@ -2767,7 +2767,7 @@ UtfToUcs2Proc( result = TCL_CONVERT_NOSPACE; break; } -#if TCL_UTF_MAX <= 3 +#if TCL_UTF_MAX < 4 src += (len = TclUtfToUniChar(src, &ch)); if ((ch >= 0xD800) && (len < 3)) { src += TclUtfToUniChar(src, &ch); @@ -3180,7 +3180,7 @@ Iso88591FromUtfProc( */ if (ch > 0xFF -#if TCL_UTF_MAX <= 3 +#if TCL_UTF_MAX < 4 || ((ch >= 0xD800) && (len < 3)) #endif ) { @@ -3188,7 +3188,7 @@ Iso88591FromUtfProc( result = TCL_CONVERT_UNKNOWN; break; } -#if TCL_UTF_MAX <= 3 +#if TCL_UTF_MAX < 4 if ((ch >= 0xD800) && (len < 3)) { len = 4; } diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 9d28868..db2a402 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -556,7 +556,7 @@ Tcl_GetUniChar( return -1; } ch = stringPtr->unicode[index]; -#if TCL_UTF_MAX <= 3 +#if TCL_UTF_MAX < 4 /* See: bug [11ae2be95dac9417] */ if ((ch & 0xF800) == 0xD800) { if (ch & 0x400) { @@ -740,7 +740,7 @@ Tcl_GetRange( TclNewObj(newObjPtr); return newObjPtr; } -#if TCL_UTF_MAX <= 3 +#if TCL_UTF_MAX < 4 /* See: bug [11ae2be95dac9417] */ if ((first + 1 > 1) && ((stringPtr->unicode[first] & 0xFC00) == 0xDC00) && ((stringPtr->unicode[first-1] & 0xFC00) == 0xD800)) { diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 98a93b7..044da51 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -72,7 +72,7 @@ #endif -#if TCL_UTF_MAX <= 3 +#if TCL_UTF_MAX < 4 static void uniCodePanic() { Tcl_Panic("This extension uses a deprecated function, not available now: Tcl is compiled with -DTCL_UTF_MAX==%d", TCL_UTF_MAX); } |