Tcl Source Code

Check-in [c5126a3728]
Login
Bounty program for improvements to Tcl and certain Tcl packages.

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

Overview
Comment:merge 8.7
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-421
Files: files | file ages | folders
SHA3-256: c5126a3728670143da564bda6752797cc5d030d2542e4ca20c89b8c4d5f4aedd
User & Date: dgp 2018-03-11 22:34:51
Context
2018-03-15
14:18
merge 8.7 check-in: 16cda61498 user: dgp tags: tip-421
2018-03-11
22:34
merge 8.7 check-in: c5126a3728 user: dgp tags: tip-421
21:29
merge 8.6 check-in: 23c46c8cd1 user: dgp tags: core-8-branch
2018-03-10
16:03
merge 8.7 check-in: 01268def02 user: dgp tags: tip-421
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to generic/tclExecute.c.

4955
4956
4957
4958
4959
4960
4961






4962
4963
4964
4965
4966
4967
4968
	 */

#ifndef TCL_COMPILE_DEBUG
	if (*(pc+9) == INST_POP) {
	    NEXT_INST_F(10, 1, 0);
	}
#endif







	/* Decode index value operands. */

	/* 
	assert ( toIdx != TCL_INDEX_AFTER);
	 *
	 * Extra safety for legacy bytecodes:






>
>
>
>
>
>







4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
	 */

#ifndef TCL_COMPILE_DEBUG
	if (*(pc+9) == INST_POP) {
	    NEXT_INST_F(10, 1, 0);
	}
#endif

	/* Every range of an empty list is an empty list */
	if (objc == 0) {
	    TRACE_APPEND(("\n"));
	    NEXT_INST_F(9, 0, 0);
	}

	/* Decode index value operands. */

	/* 
	assert ( toIdx != TCL_INDEX_AFTER);
	 *
	 * Extra safety for legacy bytecodes:

Changes to generic/tclOO.c.

628
629
630
631
632
633
634









635
636
637
638
639
640
641
....
1016
1017
1018
1019
1020
1021
1022

1023
1024















1025
1026
1027
1028
1029
1030
1031
    ClientData clientData,	/* Pointer to the OO system foundation
				 * structure. */
    Tcl_Interp *interp)		/* The interpreter containing the OO system
				 * foundation. */
{
    Foundation *fPtr = GetFoundation(interp);










    TclDecrRefCount(fPtr->unknownMethodNameObj);
    TclDecrRefCount(fPtr->constructorName);
    TclDecrRefCount(fPtr->destructorName);
    TclDecrRefCount(fPtr->clonedName);
    TclDecrRefCount(fPtr->defineName);
    ckfree(fPtr);
}
................................................................................
    if (clsPtr->filters.num) {
	Tcl_Obj *filterObj;

	FOREACH(filterObj, clsPtr->filters) {
	    TclDecrRefCount(filterObj);
	}
	ckfree(clsPtr->filters.list);

	clsPtr->filters.num = 0;
    }
















    /*
     * Squelch our metadata.
     */

    if (clsPtr->metadataPtr != NULL) {
	Tcl_ObjectMetadataType *metadataTypePtr;






>
>
>
>
>
>
>
>
>







 







>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
....
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
    ClientData clientData,	/* Pointer to the OO system foundation
				 * structure. */
    Tcl_Interp *interp)		/* The interpreter containing the OO system
				 * foundation. */
{
    Foundation *fPtr = GetFoundation(interp);

    /*
     * Crude mechanism to avoid leaking the Object struct of the
     * foundation components oo::object and oo::class
     *
     * Should probably be replaced with something more elegantly designed.
     */
    while (TclOODecrRefCount(fPtr->objectCls->thisPtr) == 0) {};
    while (TclOODecrRefCount(fPtr->classCls->thisPtr) == 0) {};

    TclDecrRefCount(fPtr->unknownMethodNameObj);
    TclDecrRefCount(fPtr->constructorName);
    TclDecrRefCount(fPtr->destructorName);
    TclDecrRefCount(fPtr->clonedName);
    TclDecrRefCount(fPtr->defineName);
    ckfree(fPtr);
}
................................................................................
    if (clsPtr->filters.num) {
	Tcl_Obj *filterObj;

	FOREACH(filterObj, clsPtr->filters) {
	    TclDecrRefCount(filterObj);
	}
	ckfree(clsPtr->filters.list);
	clsPtr->filters.list = NULL;
	clsPtr->filters.num = 0;
    }

    /*
     * Squelch our instances.
     */

    if (clsPtr->instances.num) {
	Object *oPtr;

	FOREACH(oPtr, clsPtr->instances) {
	    TclOODecrRefCount(oPtr);
	}
	ckfree(clsPtr->instances.list);
	clsPtr->instances.list = NULL;
	clsPtr->instances.num = 0;
    }

    /*
     * Squelch our metadata.
     */

    if (clsPtr->metadataPtr != NULL) {
	Tcl_ObjectMetadataType *metadataTypePtr;

Changes to generic/tclPkg.c.

1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
	    }

	    /*
	     * Create a new-style requirement for the exact version.
	     */

	    ov = Tcl_NewStringObj(version, -1);
	    Tcl_IncrRefCount(ov);
	    Tcl_AppendStringsToObj(ov, "-", version, NULL);
	    version = NULL;
	    argv3 = TclGetString(objv[3]);
	    Tcl_IncrRefCount(objv[3]);

	    objvListPtr = Tcl_NewListObj(0, NULL);
	    Tcl_IncrRefCount(objvListPtr);






<







1244
1245
1246
1247
1248
1249
1250

1251
1252
1253
1254
1255
1256
1257
	    }

	    /*
	     * Create a new-style requirement for the exact version.
	     */

	    ov = Tcl_NewStringObj(version, -1);

	    Tcl_AppendStringsToObj(ov, "-", version, NULL);
	    version = NULL;
	    argv3 = TclGetString(objv[3]);
	    Tcl_IncrRefCount(objv[3]);

	    objvListPtr = Tcl_NewListObj(0, NULL);
	    Tcl_IncrRefCount(objvListPtr);