diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixInit.c | 2 | ||||
-rw-r--r-- | unix/tclUnixSock.c | 2 | ||||
-rw-r--r-- | unix/tclUnixThrd.c | 10 |
3 files changed, 10 insertions, 4 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 91fb986..31177a3 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -761,7 +761,7 @@ TclpSetVariables( CFLocaleRef localeRef; - if (CFLocaleCopyCurrent != NULL && CFLocaleGetIdentifier != NULL && + if (&CFLocaleCopyCurrent != NULL && &CFLocaleGetIdentifier != NULL && (localeRef = CFLocaleCopyCurrent())) { CFStringRef locale = CFLocaleGetIdentifier(localeRef); diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index ff1f62e..5d11a28 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -1474,7 +1474,7 @@ Tcl_OpenTcpServer( } retry++; chosenport = 0; - + if (!TclCreateSocketAddress(interp, &addrlist, myHost, port, 1, &errorMsg)) { my_errno = errno; goto error; diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 8f8eb7f..7394545 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -712,7 +712,7 @@ void TclpInitAllocCache(void) { pthread_mutex_lock(allocLockPtr); - pthread_key_create(&key, TclpFreeAllocCache); + pthread_key_create(&key, NULL); pthread_mutex_unlock(allocLockPtr); } @@ -722,13 +722,19 @@ TclpFreeAllocCache( { if (ptr != NULL) { /* - * Called by the pthread lib when a thread exits + * Called by TclFinalizeThreadAllocThread() during the thread + * finalization initiated from Tcl_FinalizeThread() */ TclFreeAllocCache(ptr); pthread_setspecific(key, NULL); } else { + /* + * Called by TclFinalizeThreadAlloc() during the process + * finalization initiated from Tcl_Finalize() + */ + pthread_key_delete(key); } } |