Tcl Source Code

Check-in [212c0638b1]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[7368d225a6] Extend the auto-cleanup of zero ref count values passed in to the Tcl_*SetVar*() family of routines to cover the missing case where the flags value of TCL_APPEND_VALUE is passed in alone. *** POTENTIAL INCOMAPTIBILITY***
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch | potential incompatibility
Files: files | file ages | folders
SHA1: 212c0638b1fb7ce1d0b7f0e20c9d8a3e808a5397
User & Date: dgp 2014-07-10 15:45:32
Context
2014-07-10
18:00
dup test name check-in: 033a1af993 user: dgp tags: core-8-5-branch
16:40
[7368d225a6] Extend the auto-cleanup of zero ref count values passed in to the Tcl_*SetVar*() family... check-in: d9d00aa893 user: dgp tags: trunk, potential incompatibility
15:45
[7368d225a6] Extend the auto-cleanup of zero ref count values passed in to the Tcl_*SetVar*() family... check-in: 212c0638b1 user: dgp tags: core-8-5-branch, potential incompatibility
12:52
Repair buffer indexing error in Tcl_ReadRaw() exposed by iogt-6.0 and valgrind. check-in: 6526c14303 user: dgp tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclVar.c.

1912
1913
1914
1915
1916
1917
1918



1919
1920
1921
1922
1923
1924
1925
		    TclContinuationsCopy (varPtr->value.objPtr, oldValuePtr);

		    TclDecrRefCount(oldValuePtr);
		    oldValuePtr = varPtr->value.objPtr;
		    Tcl_IncrRefCount(oldValuePtr);	/* Since var is ref */
		}
		Tcl_AppendObjToObj(oldValuePtr, newValuePtr);



	    }
	}
    } else if (newValuePtr != oldValuePtr) {
	/*
	 * In this case we are replacing the value, so we don't need to do
	 * more than swap the objects.
	 */






>
>
>







1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
		    TclContinuationsCopy (varPtr->value.objPtr, oldValuePtr);

		    TclDecrRefCount(oldValuePtr);
		    oldValuePtr = varPtr->value.objPtr;
		    Tcl_IncrRefCount(oldValuePtr);	/* Since var is ref */
		}
		Tcl_AppendObjToObj(oldValuePtr, newValuePtr);
		if (newValuePtr->refCount == 0) {
		    Tcl_DecrRefCount(newValuePtr);
		}
	    }
	}
    } else if (newValuePtr != oldValuePtr) {
	/*
	 * In this case we are replacing the value, so we don't need to do
	 * more than swap the objects.
	 */