Itcl - the [incr Tcl] extension

Check-in [1c5d7c7931]
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:Add missing Tcl_IncrRefCount in ItclFinishCmd.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1c5d7c793107cebbc6dc4f15340e2aa1b001f4d7bc9304121ac62095205e43be
User & Date: pooryorick 2017-12-31 11:33:48
Context
2018-01-09
14:06
Make tests in basic.test independent of each other. check-in: a42b8e2248 user: pooryorick tags: trunk
2017-12-31
11:33
Add missing Tcl_IncrRefCount in ItclFinishCmd. check-in: 1c5d7c7931 user: pooryorick tags: trunk
2017-12-30
23:21
Make FreeItclObjectInfo() a namespace cleanup routine instead of an interp cleanup routine. check-in: 943f56ae05 user: pooryorick tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/itclBase.c.

720
721
722
723
724
725
726
727

728
729
730
731
732
733
734
    /* remove the vars entry from the info dict */
    /* and replace it by the original one */
    cmdPtr = Tcl_FindCommand(interp, "info", NULL, TCL_GLOBAL_ONLY);
    if (cmdPtr != NULL && Tcl_IsEnsemble(cmdPtr)) {
        Tcl_GetEnsembleMappingDict(NULL, cmdPtr, &mapDict);
        if (mapDict != NULL) {

            objPtr = Tcl_NewStringObj("vars", -1);

	    Tcl_DictObjRemove(interp, mapDict, objPtr);
	    Tcl_DictObjPut(interp, mapDict, objPtr, infoPtr->infoVars4Ptr);
	    Tcl_DecrRefCount(objPtr);
	    Tcl_SetEnsembleMappingDict(interp, cmdPtr, mapDict);
        }
    }
    /* FIXME have to figure out why the refCount of






|
>







720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
    /* remove the vars entry from the info dict */
    /* and replace it by the original one */
    cmdPtr = Tcl_FindCommand(interp, "info", NULL, TCL_GLOBAL_ONLY);
    if (cmdPtr != NULL && Tcl_IsEnsemble(cmdPtr)) {
        Tcl_GetEnsembleMappingDict(NULL, cmdPtr, &mapDict);
        if (mapDict != NULL) {

	    objPtr = Tcl_NewStringObj("vars", -1);
	    Tcl_IncrRefCount(objPtr);
	    Tcl_DictObjRemove(interp, mapDict, objPtr);
	    Tcl_DictObjPut(interp, mapDict, objPtr, infoPtr->infoVars4Ptr);
	    Tcl_DecrRefCount(objPtr);
	    Tcl_SetEnsembleMappingDict(interp, cmdPtr, mapDict);
        }
    }
    /* FIXME have to figure out why the refCount of