diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-08-19 11:26:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-08-19 11:26:52 (GMT) |
commit | 50a8e5953a346e641c8c8b10fe1bb5010f26c1dc (patch) | |
tree | 2a421599a0603d3240ad97f01dd612a8877aad58 | |
parent | 41107649bba64d4a990d11c0f5c0fa33ed86b66c (diff) | |
parent | e98db3a11856540e4e8e222fdb2fb6a0d16e8480 (diff) | |
download | tcl-50a8e5953a346e641c8c8b10fe1bb5010f26c1dc.zip tcl-50a8e5953a346e641c8c8b10fe1bb5010f26c1dc.tar.gz tcl-50a8e5953a346e641c8c8b10fe1bb5010f26c1dc.tar.bz2 |
merge trunk.
Remove now unused internal functions.
-rw-r--r-- | doc/Method.3 | 4 | ||||
-rw-r--r-- | doc/my.n | 2 | ||||
-rw-r--r-- | doc/next.n | 4 | ||||
-rw-r--r-- | generic/tclExecute.c | 1 | ||||
-rw-r--r-- | generic/tclInt.h | 3 | ||||
-rw-r--r-- | generic/tclThread.c | 37 | ||||
-rw-r--r-- | unix/tclUnixThrd.c | 60 | ||||
-rw-r--r-- | win/tclWinThrd.c | 54 |
8 files changed, 14 insertions, 151 deletions
diff --git a/doc/Method.3 b/doc/Method.3 index 550b64a..225da00 100644 --- a/doc/Method.3 +++ b/doc/Method.3 @@ -67,7 +67,9 @@ The class to create the method in. The name of the method to create. Should not be NULL unless creating constructors or destructors. .AP int isPublic in -A boolean flag saying whether the method is to be exported. +A flag saying what the visibility of the method is. The only supported public +values of this flag are 0 for a non-exported method, and 1 for an exported +method. .AP Tcl_MethodType *methodTypePtr in A description of the type of the method to create, or the type of method to compare against. @@ -37,7 +37,7 @@ the \fBoo::object\fR class, which is not publicly visible by default: oo::class create c { method count {} { \fBmy\fR variable counter - print [incr counter] + puts [incr counter] } } c create o @@ -122,7 +122,7 @@ oo::class create theSubclass { } } theSubclass create obj -oo::define obj method example args { +oo::objdefine obj method example args { puts "per-object method, args = $args" \fBnext\fR x {*}$args y \fBnext\fR @@ -176,7 +176,7 @@ oo::class create cache { } oo::object create demo -oo::define demo { +oo::objdefine demo { mixin cache method compute {a b c} { after 3000 \fI;# Simulate deep thought\fR diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 8ada6d2..7f65262 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -4186,7 +4186,6 @@ TEBCresume( } else if (flags & TCL_LEAVE_ERR_MSG) { goto slowUnsetArray; } - varPtr->value.objPtr = NULL; TRACE_APPEND(("OK\n")); NEXT_INST_F(6, 1, 0); } else if (!varPtr && !(flags & TCL_LEAVE_ERR_MSG)) { diff --git a/generic/tclInt.h b/generic/tclInt.h index 54ecc0b..356d250 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3059,9 +3059,6 @@ MODULE_SCOPE void TclpInitUnlock(void); MODULE_SCOPE Tcl_Obj * TclpObjListVolumes(void); MODULE_SCOPE void TclpMasterLock(void); MODULE_SCOPE void TclpMasterUnlock(void); -MODULE_SCOPE void TclpMutexLock(void); -MODULE_SCOPE void TclpMutexUnlock(void); -MODULE_SCOPE void TclMutexUnlockAndFinalize(Tcl_Mutex *mutex); MODULE_SCOPE int TclpMatchFiles(Tcl_Interp *interp, char *separators, Tcl_DString *dirPtr, char *pattern, char *tail); MODULE_SCOPE int TclpObjNormalizePath(Tcl_Interp *interp, diff --git a/generic/tclThread.c b/generic/tclThread.c index c2112b7..198fa6a 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -284,43 +284,6 @@ Tcl_MutexFinalize( /* *---------------------------------------------------------------------- * - * TclMutexUnlockAndFinalize -- - * - * This procedure is invoked to unlock and then finalize a mutex. - * The mutex must have been locked by Tcl_MutexLock. It is also - * removed from the list of remembered objects. The mutex can no - * longer be used after calling this procedure. - * - * Results: - * None. - * - * Side effects: - * Remove the mutex from the list. - * - *---------------------------------------------------------------------- - */ - -void -TclMutexUnlockAndFinalize( - Tcl_Mutex *mutexPtr) -{ - Tcl_Mutex mutex; - TclpMasterLock(); - TclpMutexLock(); -#ifdef TCL_THREADS - mutex = *mutexPtr; - *mutexPtr = NULL; /* Force it to be created again. */ - Tcl_MutexUnlock(&mutex); - TclpFinalizeMutex(&mutex); -#endif - ForgetSyncObject(mutexPtr, &mutexRecord); - TclpMutexUnlock(); - TclpMasterUnlock(); -} - -/* - *---------------------------------------------------------------------- - * * TclRememberCondition * * Keep a list of condition variables used during finalization. diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 02f18b8..ae81c5f 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -385,58 +385,6 @@ TclpMasterUnlock(void) /* *---------------------------------------------------------------------- * - * TclpMutexLock - * - * This procedure is used to grab a lock that serializes locking - * another mutex. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TclpMutexLock(void) -{ -#ifdef TCL_THREADS - pthread_mutex_lock(&mutexLock); -#endif -} - - -/* - *---------------------------------------------------------------------- - * - * TclpMutexUnlock - * - * This procedure is used to release a lock that serializes locking - * another mutex. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TclpMutexUnlock(void) -{ -#ifdef TCL_THREADS - pthread_mutex_unlock(&mutexLock); -#endif -} - - -/* - *---------------------------------------------------------------------- - * * Tcl_GetAllocMutex * * This procedure returns a pointer to a statically initialized mutex for @@ -510,17 +458,17 @@ retry: MASTER_UNLOCK; } while (1) { - TclpMutexLock(); + pthread_mutex_lock(&mutexLock); pmutexPtr = *((pthread_mutex_t **)mutexPtr); if (pmutexPtr == NULL) { - TclpMutexUnlock(); + pthread_mutex_unlock(&mutexLock); goto retry; } if (pthread_mutex_trylock(pmutexPtr) == 0) { - TclpMutexUnlock(); + pthread_mutex_unlock(&mutexLock); return; } - TclpMutexUnlock(); + pthread_mutex_unlock(&mutexLock); /* * BUGBUG: All core and Thread package tests pass when usleep() * is used; however, the Thread package tests hang at diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 7fd5ff5..ae7ce80 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -482,52 +482,6 @@ TclpMasterUnlock(void) /* *---------------------------------------------------------------------- * - * TclpMutexLock - * - * This procedure is used to grab a lock that serializes locking - * another mutex. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TclpMutexLock(void) -{ - EnterCriticalSection(&mutexLock); -} - -/* - *---------------------------------------------------------------------- - * - * TclpMutexUnlock - * - * This procedure is used to release a lock that serializes locking - * another mutex. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TclpMutexUnlock(void) -{ - LeaveCriticalSection(&mutexLock); -} - -/* - *---------------------------------------------------------------------- - * * Tcl_GetAllocMutex * * This procedure returns a pointer to a statically initialized mutex for @@ -652,17 +606,17 @@ retry: MASTER_UNLOCK; } while (1) { - TclpMutexLock(); + EnterCriticalSection(&mutexLock); csPtr = *((CRITICAL_SECTION **)mutexPtr); if (csPtr == NULL) { - TclpMutexUnlock(); + LeaveCriticalSection(&mutexLock); goto retry; } if (TryEnterCriticalSection(csPtr)) { - TclpMutexUnlock(); + LeaveCriticalSection(&mutexLock); return; } - TclpMutexUnlock(); + LeaveCriticalSection(&mutexLock); Tcl_Sleep(TCL_MUTEX_LOCK_SLEEP_TIME); } } |