summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorsurles <surles>1998-07-24 13:49:13 (GMT)
committersurles <surles>1998-07-24 13:49:13 (GMT)
commitaaf71b185279c46208cedda0caf510bc43baa437 (patch)
treeadfbcc6f4259a132707c66b34c76a64cab2654f4 /generic/tclCompile.c
parent88d6f2dc3a97fd42cfca3ea9bb1cb3a721e10c76 (diff)
downloadtcl-aaf71b185279c46208cedda0caf510bc43baa437.zip
tcl-aaf71b185279c46208cedda0caf510bc43baa437.tar.gz
tcl-aaf71b185279c46208cedda0caf510bc43baa437.tar.bz2
Updated core w/ Micheals latest changes.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 7f07a27..c5bce05 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -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.
*
- * SCCS: %Z% $Id: tclCompile.c,v 1.7 1998/07/06 14:54:30 welch Exp $
+ * SCCS: %Z% $Id: tclCompile.c,v 1.8 1998/07/24 13:49:13 surles Exp $
*/
#include "tclInt.h"
@@ -6690,8 +6690,9 @@ LookupCompiledLocal(name, nameChars, createIfNew, flagsIfCreated, procPtr)
localPtr = procPtr->firstLocalPtr;
for (i = 0; i < localCt; i++) {
if (!localPtr->isTemp) {
- currInfo = &localPtr->resolveInfo;
- if ( (currInfo->fetchProc == vinfo.fetchProc) &&
+ currInfo = localPtr->resolveInfo;
+ if ( currInfo &&
+ (currInfo->fetchProc == vinfo.fetchProc) &&
(currInfo->identity == vinfo.identity) ) {
return i;
}
@@ -6729,9 +6730,16 @@ createCompiledLocal:
localPtr->isTemp = (name == NULL);
localPtr->flags = flagsIfCreated;
localPtr->defValuePtr = NULL;
- localPtr->resolveInfo.identity = vinfo.identity;
- localPtr->resolveInfo.fetchProc = vinfo.fetchProc;
- localPtr->resolveInfo.deleteProc = vinfo.deleteProc;
+ localPtr->resolveInfo = NULL;
+
+ if (vinfo.fetchProc) {
+ localPtr->resolveInfo =
+ (Tcl_ResolvedVarInfo *) ckalloc( sizeof(Tcl_ResolvedVarInfo) );
+ localPtr->resolveInfo->identity = vinfo.identity;
+ localPtr->resolveInfo->fetchProc = vinfo.fetchProc;
+ localPtr->resolveInfo->deleteProc = vinfo.deleteProc;
+ }
+
if (name != NULL) {
memcpy((VOID *) localPtr->name, (VOID *) name, (size_t) nameChars);
}