diff options
author | kennykb <kennykb@noemail.net> | 2005-06-24 18:21:36 (GMT) |
---|---|---|
committer | kennykb <kennykb@noemail.net> | 2005-06-24 18:21:36 (GMT) |
commit | 75ec4722418880bfe2395368907a98e50560c1c3 (patch) | |
tree | e61562eda7d9ce59a92bc8c1e14fda5f852ffe6d /generic/tclPreserve.c | |
parent | a95b3e5c3b87446296175b3af934dfaae1cc35d1 (diff) | |
download | tcl-75ec4722418880bfe2395368907a98e50560c1c3.zip tcl-75ec4722418880bfe2395368907a98e50560c1c3.tar.gz tcl-75ec4722418880bfe2395368907a98e50560c1c3.tar.bz2 |
finalize Tcl_Preserve after exit handlers
FossilOrigin-Name: 7dafabb1d224c05c6f58398902dc626f6fe55474
Diffstat (limited to 'generic/tclPreserve.c')
-rw-r--r-- | generic/tclPreserve.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c index 04615b7..9352e84 100644 --- a/generic/tclPreserve.c +++ b/generic/tclPreserve.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPreserve.c,v 1.3.34.1 2003/07/16 21:25:07 hobbs Exp $ + * RCS: @(#) $Id: tclPreserve.c,v 1.3.34.2 2005/06/24 18:21:41 kennykb Exp $ */ #include "tclInt.h" @@ -66,17 +66,11 @@ typedef struct HandleStruct { } HandleStruct; -/* - * Static routines in this file: - */ - -static void PreserveExitProc _ANSI_ARGS_((ClientData clientData)); - /* *---------------------------------------------------------------------- * - * PreserveExitProc -- + * TclFinalizePreserve -- * * Called during exit processing to clean up the reference array. * @@ -90,9 +84,8 @@ static void PreserveExitProc _ANSI_ARGS_((ClientData clientData)); */ /* ARGSUSED */ -static void -PreserveExitProc(clientData) - ClientData clientData; /* NULL -Unused. */ +void +TclFinalizePreserve() { Tcl_MutexLock(&preserveMutex); if (spaceAvl != 0) { @@ -151,8 +144,6 @@ Tcl_Preserve(clientData) if (inUse == spaceAvl) { if (spaceAvl == 0) { - Tcl_CreateExitHandler((Tcl_ExitProc *) PreserveExitProc, - (ClientData) NULL); refArray = (Reference *) ckalloc((unsigned) (INITIAL_SIZE*sizeof(Reference))); spaceAvl = INITIAL_SIZE; |