TEA (tclconfig) Source Code

View Ticket
Login
Ticket UUID: 6ade28ab79d99479e5f6125dd63072e002003187
Title: Define "Tcl_Size" when compiling with Tcl = 8.7
Type: RFE Version:
Submitter: xdelaruelle Created on: 2024-05-12 15:37:50
Subsystem: 85. tclconfig Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2024-05-12 15:37:50
Resolution: None Closed By: nobody
    Closed on:
Description:
Hello,

Commit f0385027e9ba256e adds definition of "Tcl_Size" type if compiling with Tcl <= 8.6.

I wonder if this definition could also be defined if compiling with Tcl = 8.7.

I build my code for test against last published version of Tcl9 and Tcl8.7. On Tcl8.7a5, it seems that Tcl_Size is not defined as I get the following error:

envmodules.c: In function ‘Envmodules_GetFilesInDirectoryObjCmd’:
envmodules.c:80:4: error: unknown type name ‘Tcl_Size’; did you mean ‘Tcl_Time’?
   80 |    Tcl_Size dirlen;
      |    ^~~~~~~~
      |    Tcl_Time

It would be wonderful to also have the type defined on Tcl8.7, as I will be able to completely drop some pragma, needed otherwise to port to Tcl9:

-#if TCL_MAJOR_VERSION < 9
-   int dirlen;
-#else
    Tcl_Size dirlen;
-#endif

Regards,
Xavier