summaryrefslogtreecommitdiffstats
path: root/generic/tclPreserve.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclPreserve.c')
-rw-r--r--generic/tclPreserve.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c
index 0dc669c..a6c24f7 100644
--- a/generic/tclPreserve.c
+++ b/generic/tclPreserve.c
@@ -89,10 +89,10 @@ TclFinalizePreserve(void)
{
Tcl_MutexLock(&preserveMutex);
if (spaceAvl != 0) {
- ckfree((char *) refArray);
- refArray = NULL;
- inUse = 0;
- spaceAvl = 0;
+ ckfree((char *) refArray);
+ refArray = NULL;
+ inUse = 0;
+ spaceAvl = 0;
}
Tcl_MutexUnlock(&preserveMutex);
}
@@ -227,7 +227,7 @@ Tcl_Release(
if (freeProc == TCL_DYNAMIC) {
ckfree((char *) clientData);
} else {
- (*freeProc)((char *) clientData);
+ freeProc((char *) clientData);
}
}
return;
@@ -238,7 +238,7 @@ Tcl_Release(
* Reference not found. This is a bug in the caller.
*/
- Tcl_Panic("Tcl_Release couldn't find reference for 0x%x", PTR2UINT(clientData));
+ Tcl_Panic("Tcl_Release couldn't find reference for %p", clientData);
}
/*
@@ -278,13 +278,12 @@ Tcl_EventuallyFree(
continue;
}
if (refPtr->mustFree) {
- Tcl_Panic("Tcl_EventuallyFree called twice for 0x%x",
- PTR2UINT(clientData));
- }
- refPtr->mustFree = 1;
+ Tcl_Panic("Tcl_EventuallyFree called twice for %p", clientData);
+ }
+ refPtr->mustFree = 1;
refPtr->freeProc = freeProc;
Tcl_MutexUnlock(&preserveMutex);
- return;
+ return;
}
Tcl_MutexUnlock(&preserveMutex);
@@ -295,7 +294,7 @@ Tcl_EventuallyFree(
if (freeProc == TCL_DYNAMIC) {
ckfree((char *) clientData);
} else {
- (*freeProc)((char *)clientData);
+ freeProc((char *)clientData);
}
}