summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-03-31 08:52:03 (GMT)
committerhobbs <hobbs>2000-03-31 08:52:03 (GMT)
commit3c56f64822ed7b64de23a900456152fe8ee1fb60 (patch)
tree27c79cab0f46f3ede18026925120382d8f111363 /generic/tclBasic.c
parent82a82afca9929d66fcf5356ef5a3d8fae735c4fb (diff)
downloadtcl-3c56f64822ed7b64de23a900456152fe8ee1fb60.zip
tcl-3c56f64822ed7b64de23a900456152fe8ee1fb60.tar.gz
tcl-3c56f64822ed7b64de23a900456152fe8ee1fb60.tar.bz2
* generic/tclBasic.c (Tcl_DeleteCommandFromToken): Added comments
noting the need to pair ckalloc with ckfree. [Bug: 4262] * generic/tclInt.decls: * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: * win/tclWin32Dll.c: removed TclWinSynchSpawn (vestige of Win32s support).
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 9968614..1bd7682 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.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: tclBasic.c,v 1.24 2000/01/21 02:25:25 hobbs Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.25 2000/03/31 08:52:03 hobbs Exp $
*/
#include "tclInt.h"
@@ -2025,8 +2025,8 @@ Tcl_SetCommandInfo(interp, cmdName, infoPtr)
Tcl_Interp *interp; /* Interpreter in which to look
* for command. */
char *cmdName; /* Name of desired command. */
- Tcl_CmdInfo *infoPtr; /* Where to store information about
- * command. */
+ Tcl_CmdInfo *infoPtr; /* Where to find store information
+ * to store in the command. */
{
Tcl_Command cmd;
Command *cmdPtr;
@@ -2315,6 +2315,16 @@ Tcl_DeleteCommandFromToken(interp, cmd)
* the "real" command that this imported command refers to.
*/
+ /*
+ * If you are getting a crash during the call to deleteProc and
+ * cmdPtr->deleteProc is a pointer to the function free(), the
+ * most likely cause is that your extension allocated memory
+ * for the clientData argument to Tcl_CreateObjCommand() with
+ * the ckalloc() macro and you are now trying to deallocate
+ * this memory with free() instead of ckfree(). You should
+ * pass a pointer to your own method that calls ckfree().
+ */
+
(*cmdPtr->deleteProc)(cmdPtr->deleteData);
}