Tcl Source Code

Check-in [5e8df6f232]
Login

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

Overview
Comment:amend to [e2f55d6060] (fix for [7179c6724cd38271]): wideint-type dependency
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: 5e8df6f2328b226d3a48786508d87c5723e47a7c8ba52be6a04f4d9b7feb41b3
User & Date: sebres 2024-08-12 16:12:23.231
References
2024-08-31
00:50
Merge [5e8df6f2328b226d]: amend to [e2f55d6060] (fix for [7179c6724cd38271]): wideint-type dependenc... Closed-Leaf check-in: 517cb91ee8 user: pooryorick tags: mistake, INCOMPATIBLE_LICENSE
Context
2024-08-31
00:50
Merge [5e8df6f2328b226d]: amend to [e2f55d6060] (fix for [7179c6724cd38271]): wideint-type dependenc... Closed-Leaf check-in: 517cb91ee8 user: pooryorick tags: mistake, INCOMPATIBLE_LICENSE
2024-08-12
16:37
Fix Tk [1562e10c58]: with macOS framework build, tclsh cannot find Tk if there are multiple versions... check-in: ac279496ac user: culler tags: core-8-6-branch
16:19
merge point (no changes) check-in: 1ab0e357a8 user: sebres tags: core-8-branch
16:12
amend to [e2f55d6060] (fix for [7179c6724cd38271]): wideint-type dependency check-in: 5e8df6f232 user: sebres tags: core-8-6-branch
13:19
merge fix for [7179c6724cd38271]: compilation of incr command on wide constant offset (no overflow) ... check-in: e2f55d6060 user: sebres tags: core-8-6-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/tclCompCmdsGR.c.
506
507
508
509
510
511
512

513
514
515
516

517
518
519
520
521
522
523
	    Tcl_Obj *intObj = Tcl_NewStringObj(word, numBytes);

	    Tcl_IncrRefCount(intObj);
	    code = TclGetIntFromObj(NULL, intObj, &immValue);
	    if ( (code == TCL_OK)
	      && (-127 <= immValue) && (immValue <= 127)
	      /* avoid overflow during string to int conversion (wide 0xFFFFFFFF to signed int -1): */

	      && ( (immValue >= 0)
	        || (intObj->typePtr != &tclWideIntType)
	        || ((-127 <= intObj->internalRep.wideValue) && (intObj->internalRep.wideValue <= 127))
	      )

	    ) {
		haveImmValue = 1;
	    }
	    TclDecrRefCount(intObj);
	    if (!haveImmValue) {
		PushLiteral(envPtr, word, numBytes);
	    }







>




>







506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
	    Tcl_Obj *intObj = Tcl_NewStringObj(word, numBytes);

	    Tcl_IncrRefCount(intObj);
	    code = TclGetIntFromObj(NULL, intObj, &immValue);
	    if ( (code == TCL_OK)
	      && (-127 <= immValue) && (immValue <= 127)
	      /* avoid overflow during string to int conversion (wide 0xFFFFFFFF to signed int -1): */
#ifndef TCL_WIDE_INT_IS_LONG
	      && ( (immValue >= 0)
	        || (intObj->typePtr != &tclWideIntType)
	        || ((-127 <= intObj->internalRep.wideValue) && (intObj->internalRep.wideValue <= 127))
	      )
#endif
	    ) {
		haveImmValue = 1;
	    }
	    TclDecrRefCount(intObj);
	    if (!haveImmValue) {
		PushLiteral(envPtr, word, numBytes);
	    }