summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-03 16:05:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-03 16:05:31 (GMT)
commit6b77853e6dcdec7566901f635b7298c8fa5dd349 (patch)
tree01db44fdacc53c737b3eca7e953393794e326a41 /generic/tclVar.c
parent50a21353617798019e1200fb102877f4c1e1ca22 (diff)
parentd92d307894b14bbb065fdb65c5158f391da00cf1 (diff)
downloadtcl-6b77853e6dcdec7566901f635b7298c8fa5dd349.zip
tcl-6b77853e6dcdec7566901f635b7298c8fa5dd349.tar.gz
tcl-6b77853e6dcdec7566901f635b7298c8fa5dd349.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index bfb2205..308a88e 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -475,6 +475,7 @@ TclObjLookupVar(
if (part2) {
part2Ptr = Tcl_NewStringObj(part2, -1);
+ Tcl_IncrRefCount(part2Ptr);
}
resPtr = TclObjLookupVarEx(interp, part1Ptr, part2Ptr,
@@ -1321,8 +1322,10 @@ Tcl_GetVar2Ex(
{
Tcl_Obj *resPtr, *part2Ptr = NULL, *part1Ptr = Tcl_NewStringObj(part1, -1);
+ Tcl_IncrRefCount(part1Ptr);
if (part2) {
part2Ptr = Tcl_NewStringObj(part2, -1);
+ Tcl_IncrRefCount(part2Ptr);
}
resPtr = Tcl_ObjGetVar2(interp, part1Ptr, part2Ptr, flags);
@@ -2215,8 +2218,10 @@ Tcl_UnsetVar2(
int result;
Tcl_Obj *part2Ptr = NULL, *part1Ptr = Tcl_NewStringObj(part1, -1);
+ Tcl_IncrRefCount(part1Ptr);
if (part2) {
part2Ptr = Tcl_NewStringObj(part2, -1);
+ Tcl_IncrRefCount(part2Ptr);
}
/*
@@ -3085,7 +3090,7 @@ ArrayStartSearchCmd(
Tcl_ObjPrintf("s-%d-%s", searchPtr->id, varName));
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3191,7 +3196,7 @@ ArrayAnyMoreCmd(
Tcl_SetObjResult(interp, iPtr->execEnvPtr->constants[gotValue]);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5775,6 +5780,7 @@ Tcl_FindNamespaceVar(
Tcl_Obj *namePtr = Tcl_NewStringObj(name, -1);
Tcl_Var var;
+ Tcl_IncrRefCount(namePtr);
var = ObjFindNamespaceVar(interp, namePtr, contextNsPtr, flags);
Tcl_DecrRefCount(namePtr);
return var;
@@ -5869,6 +5875,7 @@ ObjFindNamespaceVar(
varPtr = NULL;
if (simpleName != name) {
simpleNamePtr = Tcl_NewStringObj(simpleName, -1);
+ Tcl_IncrRefCount(simpleNamePtr);
} else {
simpleNamePtr = namePtr;
}