diff options
-rw-r--r-- | generic/tclInt.h | 2 | ||||
-rw-r--r-- | generic/tclObj.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 4d3c0b1..65ef1c6 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4521,6 +4521,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; do { \ TclInvalidateStringRep(objPtr); \ TclFreeIntRep(objPtr); \ + (objPtr)->internalRep.twoPtrValue.ptr2 = NULL; \ (objPtr)->internalRep.doubleValue = (double)(d); \ (objPtr)->typePtr = &tclDoubleType; \ } while (0) @@ -4570,6 +4571,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; TclAllocObjStorage(objPtr); \ (objPtr)->refCount = 0; \ (objPtr)->bytes = NULL; \ + (objPtr)->internalRep.twoPtrValue.ptr2 = NULL; \ (objPtr)->internalRep.doubleValue = (double)(d); \ (objPtr)->typePtr = &tclDoubleType; \ TCL_DTRACE_OBJ_CREATE(objPtr); \ diff --git a/generic/tclObj.c b/generic/tclObj.c index a346987..d549fdc 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -2203,6 +2203,7 @@ Tcl_DbNewDoubleObj( TclDbNewObj(objPtr, file, line); objPtr->bytes = NULL; + objPtr->internalRep.twoPtrValue.ptr2 = NULL; /* valgrind */ objPtr->internalRep.doubleValue = dblValue; objPtr->typePtr = &tclDoubleType; return objPtr; |