summaryrefslogtreecommitdiffstats
path: root/generic
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
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')
-rw-r--r--generic/tclBasic.c16
-rw-r--r--generic/tclIOSock.c5
-rw-r--r--generic/tclInt.decls9
-rw-r--r--generic/tclIntPlatDecls.h13
-rw-r--r--generic/tclStubInit.c4
5 files changed, 28 insertions, 19 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);
}
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index 1d6c642..82d10a8 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOSock.c,v 1.4 1999/11/19 06:34:23 hobbs Exp $
+ * RCS: @(#) $Id: tclIOSock.c,v 1.5 2000/03/31 08:52:04 hobbs Exp $
*/
#include "tclInt.h"
@@ -91,6 +91,9 @@ TclSockMinimumBuffers(sock, size)
int size; /* Minimum buffer size */
{
int current;
+ /*
+ * Should be socklen_t, but HP10.20 (g)cc chokes
+ */
size_t len;
len = sizeof(int);
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index e649022..b9ca659 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tclInt.decls,v 1.19 1999/12/12 22:46:42 hobbs Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.20 2000/03/31 08:52:04 hobbs Exp $
library tcl
@@ -751,9 +751,10 @@ declare 8 win {
declare 9 win {
int TclWinGetPlatformId(void)
}
-declare 10 win {
- int TclWinSynchSpawn(void *args, int type, void **trans, Tcl_Pid *pidPtr)
-}
+# Removed in 8.3.1 (for Win32s only)
+#declare 10 win {
+# int TclWinSynchSpawn(void *args, int type, void **trans, Tcl_Pid *pidPtr)
+#}
# Pipe channel functions
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 6cbf482..82c028a 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.7 1999/08/01 20:44:11 hobbs Exp $
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.8 2000/03/31 08:52:05 hobbs Exp $
*/
#ifndef _TCLINTPLATDECLS
@@ -85,9 +85,7 @@ EXTERN int TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level,
EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid));
/* 9 */
EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void));
-/* 10 */
-EXTERN int TclWinSynchSpawn _ANSI_ARGS_((void * args, int type,
- void ** trans, Tcl_Pid * pidPtr));
+/* Slot 10 is reserved */
/* 11 */
EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_Channel chan));
@@ -226,7 +224,7 @@ typedef struct TclIntPlatStubs {
int (*tclWinSetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, CONST char FAR * optval, int optlen)); /* 7 */
unsigned long (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */
int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */
- int (*tclWinSynchSpawn) _ANSI_ARGS_((void * args, int type, void ** trans, Tcl_Pid * pidPtr)); /* 10 */
+ void *reserved10;
void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 11 */
int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 12 */
Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr)); /* 13 */
@@ -365,10 +363,7 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr;
#define TclWinGetPlatformId \
(tclIntPlatStubsPtr->tclWinGetPlatformId) /* 9 */
#endif
-#ifndef TclWinSynchSpawn
-#define TclWinSynchSpawn \
- (tclIntPlatStubsPtr->tclWinSynchSpawn) /* 10 */
-#endif
+/* Slot 10 is reserved */
#ifndef TclGetAndDetachPids
#define TclGetAndDetachPids \
(tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 47b5a1b..c2349d1 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubInit.c,v 1.31 2000/01/24 02:29:58 hobbs Exp $
+ * RCS: @(#) $Id: tclStubInit.c,v 1.32 2000/03/31 08:52:06 hobbs Exp $
*/
#include "tclInt.h"
@@ -264,7 +264,7 @@ TclIntPlatStubs tclIntPlatStubs = {
TclWinSetSockOpt, /* 7 */
TclpGetPid, /* 8 */
TclWinGetPlatformId, /* 9 */
- TclWinSynchSpawn, /* 10 */
+ NULL, /* 10 */
TclGetAndDetachPids, /* 11 */
TclpCloseFile, /* 12 */
TclpCreateCommandChannel, /* 13 */