Tcl Source Code

Check-in [03fa2a45da]
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:Correct unbalanced effect of TclInvalidateCmdLiteral() on the refcounts of literals in the global table.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-3607246
Files: files | file ages | folders
SHA1: 03fa2a45da0aeb5857c8997b80b357edd4ef0abd
User & Date: dgp 2013-03-07 21:16:29
Context
2013-03-08
21:14
3607372 Correct literal refcounting. Closed-Leaf check-in: 1c1952f439 user: dgp tags: bug-3607372
2013-03-07
21:16
Correct unbalanced effect of TclInvalidateCmdLiteral() on the refcounts of literals in the global ta... Closed-Leaf check-in: 03fa2a45da user: dgp tags: bug-3607246
2013-03-06
21:55
Cleaner error handling in fixempties(). check-in: c769b9bb91 user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclLiteral.c.

1006
1007
1008
1009
1010
1011
1012

1013
1014




1015
1016
1017
1018
1019
1020
1021
    Namespace *nsPtr)		/* The namespace for which to lookup and
				 * invalidate a cmd literal. */
{
    Interp *iPtr = (Interp *) interp;
    Tcl_Obj *literalObjPtr = TclCreateLiteral(iPtr, (char *) name,
	    strlen(name), -1, NULL, nsPtr, 0, NULL);


    if (literalObjPtr != NULL && literalObjPtr->typePtr == &tclCmdNameType) {
	TclFreeIntRep(literalObjPtr);




    }
}
 
#ifdef TCL_COMPILE_STATS
/*
 *----------------------------------------------------------------------
 *






>
|
|
>
>
>
>







1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
    Namespace *nsPtr)		/* The namespace for which to lookup and
				 * invalidate a cmd literal. */
{
    Interp *iPtr = (Interp *) interp;
    Tcl_Obj *literalObjPtr = TclCreateLiteral(iPtr, (char *) name,
	    strlen(name), -1, NULL, nsPtr, 0, NULL);

    if (literalObjPtr != NULL) {
	if (literalObjPtr->typePtr == &tclCmdNameType) {
	    TclFreeIntRep(literalObjPtr);
	}
	/* Balance the refcount effects of TclCreateLiteral() above */
	Tcl_IncrRefCount(literalObjPtr);
	TclReleaseLiteral(interp, literalObjPtr);
    }
}
 
#ifdef TCL_COMPILE_STATS
/*
 *----------------------------------------------------------------------
 *