Skip to content
Tcl Source Code Changes To Migrating C extensions to Tcl 9
Login

Changes To Migrating C extensions to Tcl 9

Changes to "Migrating C extensions to Tcl 9" between 2024-01-14 05:03:00 and 2024-01-14 05:21:20

︙
75
76
77
78
79
80
81
82

83
84
85
86
87
88
89
75
76
77
78
79
80
81

82
83
84
85
86
87
88
89







-
+







# define TCL_SIZE_MODIFIER ""
#endif

```

"Tcl_Size" itself doesn't need to be provided as long as you update the extension to the latest tclconfig release. TEA (latest tcl.m4/rules.vc files) takes care of providing an appropriate preprocessor #define for `Tcl_Size`.

Note there is no complementary `Tcl_NewSizeIntFromObj`. Use `Tcl_NewWideIntObj` in its stead. 
Note there is no complementary `Tcl_NewSizeIntFromObj`. Use `Tcl_NewWideIntObj` in its stead to wrap `Tcl_Size` values. Do **not** use `Tcl_NewIntObj` as there will truncate values above 4Gb.

Paul Obermeier's very useful post [Tcl 9 functions using Tcl_Size](https://wiki.tcl-lang.org/page/Tcl+9+functions+using+Tcl%5FSize)
enumerates the functions in the Tcl API affected by this change
and provides a script to locate the use of these functions within
extensions and applications.

See [TIP 660](https://core.tcl-lang.org/tips/doc/trunk/tip/660.md)
︙