diff options
Diffstat (limited to 'generic')
| -rw-r--r-- | generic/tcl.h | 2 | ||||
| -rw-r--r-- | generic/tclStringObj.c | 2 | ||||
| -rw-r--r-- | generic/tclThreadTest.c | 10 | ||||
| -rw-r--r-- | generic/tclZipfs.c | 4 |
4 files changed, 10 insertions, 8 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 154dfc0..e6cc4be 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -985,7 +985,7 @@ typedef struct Tcl_DString { #define TCL_EXACT 1 #define TCL_INDEX_TEMP_TABLE 2 -#define TCL_INDEX_NULL_OK 4 +#define TCL_INDEX_NULL_OK 32 /* *---------------------------------------------------------------------------- diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 63b833f..33f84bd 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -4799,7 +4799,7 @@ ExtendStringRepWithUnicode( } for (i = 0; i < numChars && size >= 0; i++) { - size += TclUtfCount(unicode[i]); + size += (unsigned int)TclUtfCount(unicode[i]); } if (size < 0) { Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 9f08d83..49633f2 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -271,7 +271,7 @@ ThreadObjCmd( } else { result = NULL; } - return ThreadCancel(interp, (Tcl_ThreadId) (size_t) id, result, flags); + return ThreadCancel(interp, (Tcl_ThreadId) INT2PTR(id), result, flags); } case THREAD_CREATE: { const char *script; @@ -335,11 +335,11 @@ ThreadObjCmd( */ if (objc == 2) { - idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)Tcl_GetCurrentThread()); + idObj = Tcl_NewWideIntObj((Tcl_WideInt)PTR2INT(Tcl_GetCurrentThread())); } else if (objc == 3 && strcmp("-main", Tcl_GetString(objv[2])) == 0) { Tcl_MutexLock(&threadMutex); - idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)mainThreadId); + idObj = Tcl_NewWideIntObj((Tcl_WideInt)PTR2INT(mainThreadId)); Tcl_MutexUnlock(&threadMutex); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); @@ -364,7 +364,7 @@ ThreadObjCmd( return TCL_ERROR; } - result = Tcl_JoinThread((Tcl_ThreadId)(size_t)id, &status); + result = Tcl_JoinThread((Tcl_ThreadId)INT2PTR(id), &status); if (result == TCL_OK) { Tcl_SetIntObj(Tcl_GetObjResult(interp), status); } else { @@ -406,7 +406,7 @@ ThreadObjCmd( } arg++; script = Tcl_GetString(objv[arg]); - return ThreadSend(interp, (Tcl_ThreadId)(size_t)id, script, wait); + return ThreadSend(interp, (Tcl_ThreadId)INT2PTR(id), script, wait); } case THREAD_EVENT: { if (objc > 2) { diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index afd3db5..c936a15 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -27,7 +27,6 @@ #define MAP_FILE 0 #endif /* !MAP_FILE */ #define NOBYFOUR -#define crc32tab crc_table[0] #ifndef TBLS #define TBLS 1 #endif @@ -75,6 +74,8 @@ #include "zutil.h" #include "crc32.h" +static const z_crc_t* crc32tab; + /* ** We are compiling as part of the core. ** TIP430 style zipfs prefix @@ -1864,6 +1865,7 @@ ZipfsSetup(void) Tcl_MutexUnlock(&ZipFSMutex); #endif /* TCL_THREADS */ + crc32tab = get_crc_table(); Tcl_FSRegister(NULL, &zipfsFilesystem); Tcl_InitHashTable(&ZipFS.fileHash, TCL_STRING_KEYS); Tcl_InitHashTable(&ZipFS.zipHash, TCL_STRING_KEYS); |
