summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c4
-rw-r--r--generic/tclVar.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 6fb49ec..6777cd2 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.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: tclExecute.c,v 1.225 2005/12/27 20:14:08 kennykb Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.226 2006/02/09 17:34:41 dgp Exp $
*/
#include "tclInt.h"
@@ -2403,7 +2403,7 @@ TclExecuteByteCode(
part1 = TclGetString(objPtr);
varPtr = TclObjLookupVar(interp, objPtr, part2,
- TCL_LEAVE_ERR_MSG, "read", 0, 1, &arrayPtr);
+ TCL_LEAVE_ERR_MSG, "read", 1, 1, &arrayPtr);
if (varPtr == NULL) {
Tcl_AddObjErrorInfo(interp,
"\n (reading value of variable to increment)", -1);
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 0977bfc..50b02b3 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.119 2006/02/02 10:55:05 dkf Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.120 2006/02/09 17:34:42 dgp Exp $
*/
#include "tclInt.h"
@@ -1780,7 +1780,7 @@ TclIncrObjVar2(
part2 = ((part2Ptr == NULL)? NULL : TclGetString(part2Ptr));
varPtr = TclObjLookupVar(interp, part1Ptr, part2, flags, "read",
- 0, 1, &arrayPtr);
+ 1, 1, &arrayPtr);
if (varPtr == NULL) {
Tcl_AddObjErrorInfo(interp,
"\n (reading value of variable to increment)", -1);
@@ -1839,11 +1839,11 @@ TclPtrIncrObjVar(
register Tcl_Obj *varValuePtr, *newValuePtr = NULL;
int duplicated, code;
+ varPtr->refCount++;
varValuePtr = TclPtrGetVar(interp, varPtr, arrayPtr, part1, part2, flags);
+ varPtr->refCount--;
if (varValuePtr == NULL) {
- Tcl_AddObjErrorInfo(interp,
- "\n (reading value of variable to increment)", -1);
- return NULL;
+ varValuePtr = Tcl_NewIntObj(0);
}
if (Tcl_IsShared(varValuePtr)) {
duplicated = 1;