diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2025-06-27 15:28:01 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2025-06-27 15:28:01 (GMT) |
| commit | 34630d5ca1f72fef8f33793c09548317105e2458 (patch) | |
| tree | c09fa8317f6f0481581f5c298a80b8d7183902ba | |
| parent | b50a64424fdc6d504a545565632df140f0945ce7 (diff) | |
| parent | d5ba2b9a381d5facfec36880f6684971c4e3cf03 (diff) | |
| download | tcl-34630d5ca1f72fef8f33793c09548317105e2458.zip tcl-34630d5ca1f72fef8f33793c09548317105e2458.tar.gz tcl-34630d5ca1f72fef8f33793c09548317105e2458.tar.bz2 | |
Fix [9dfae3413d]: interp limit commands still seems to be 32 bits
| -rw-r--r-- | changes.md | 1 | ||||
| -rw-r--r-- | doc/Limit.3 | 2 | ||||
| -rw-r--r-- | generic/tcl.decls | 2 | ||||
| -rw-r--r-- | generic/tclDecls.h | 4 | ||||
| -rw-r--r-- | generic/tclInterp.c | 7 |
5 files changed, 9 insertions, 7 deletions
@@ -41,6 +41,7 @@ to the userbase. - [use after free on TSD in Winsock](https://core.tcl-lang.org/tcl/tktview/40b181) - [use after free on Windows pipe handles](https://core.tcl-lang.org/tcl/tktview/7c2716) - [tcl::build-info not documented](https://core.tcl-lang.org/tcl/tktview/ef7042) + - [interp limit commands still seems to be 32 bits](https://core.tcl-lang.org/tcl/tktview/9dfae3) # Incompatibilities - [The ActiveCodePage element has been removed from the Windows executable manifest for tclsh](https://core.tcl-lang.org/tips/doc/trunk/tip/716.md) diff --git a/doc/Limit.3 b/doc/Limit.3 index 5eb3ac8..a4005f3 100644 --- a/doc/Limit.3 +++ b/doc/Limit.3 @@ -32,7 +32,7 @@ int .sp \fBTcl_LimitTypeReset\fR(\fIinterp, type\fR) .sp -int +Tcl_Size \fBTcl_LimitGetCommands\fR(\fIinterp\fR) .sp \fBTcl_LimitSetCommands\fR(\fIinterp, commandLimit\fR) diff --git a/generic/tcl.decls b/generic/tcl.decls index ae5e04c..d72786b 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -1708,7 +1708,7 @@ declare 531 { void Tcl_LimitTypeReset(Tcl_Interp *interp, int type) } declare 532 { - int Tcl_LimitGetCommands(Tcl_Interp *interp) + Tcl_Size Tcl_LimitGetCommands(Tcl_Interp *interp) } declare 533 { void Tcl_LimitGetTime(Tcl_Interp *interp, Tcl_Time *timeLimitPtr) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index e78638f..483a735 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1410,7 +1410,7 @@ EXTERN void Tcl_LimitTypeSet(Tcl_Interp *interp, int type); /* 531 */ EXTERN void Tcl_LimitTypeReset(Tcl_Interp *interp, int type); /* 532 */ -EXTERN int Tcl_LimitGetCommands(Tcl_Interp *interp); +EXTERN Tcl_Size Tcl_LimitGetCommands(Tcl_Interp *interp); /* 533 */ EXTERN void Tcl_LimitGetTime(Tcl_Interp *interp, Tcl_Time *timeLimitPtr); @@ -2420,7 +2420,7 @@ typedef struct TclStubs { int (*tcl_LimitTypeExceeded) (Tcl_Interp *interp, int type); /* 529 */ void (*tcl_LimitTypeSet) (Tcl_Interp *interp, int type); /* 530 */ void (*tcl_LimitTypeReset) (Tcl_Interp *interp, int type); /* 531 */ - int (*tcl_LimitGetCommands) (Tcl_Interp *interp); /* 532 */ + Tcl_Size (*tcl_LimitGetCommands) (Tcl_Interp *interp); /* 532 */ void (*tcl_LimitGetTime) (Tcl_Interp *interp, Tcl_Time *timeLimitPtr); /* 533 */ int (*tcl_LimitGetGranularity) (Tcl_Interp *interp, int type); /* 534 */ Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp *interp, int status); /* 535 */ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index d58119e..90af06e 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -3965,7 +3965,7 @@ Tcl_LimitSetCommands( *---------------------------------------------------------------------- */ -int +Tcl_Size Tcl_LimitGetCommands( Tcl_Interp *interp) { @@ -4542,7 +4542,8 @@ ChildCommandLimitCmd( } else { Tcl_Size i, scriptLen = 0, limitLen = 0; Tcl_Obj *scriptObj = NULL, *granObj = NULL, *limitObj = NULL; - int gran = 0, limit = 0; + int gran = 0; + Tcl_Size limit = 0; for (i=consumedObjc ; i<objc ; i+=2) { if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, @@ -4573,7 +4574,7 @@ ChildCommandLimitCmd( if (limitLen == 0) { break; } - if (TclGetIntFromObj(interp, objv[i+1], &limit) != TCL_OK) { + if (Tcl_GetSizeIntFromObj(interp, objv[i+1], &limit) != TCL_OK) { return TCL_ERROR; } if (limit < 0) { |
