Author: Jan Nijtmans <firstname.lastname@example.org> State: Draft Type: Project Vote: Pending Created: 27-Oct-2017 Post-History: Keywords: Tcl Tcl-Version: 8.7
This TIP proposes enhancing various C API functions which now have
int * parameter,
to be used as if they have a
size_t * parameter. In addition, a new
function is proposed which can retrieve a signed or unsigned integer from a
or a float/double/long double.
In Tcl 9, the range of various functions need to be increased. For example
Tcl_GetStringFromObj now is limited to returning 32 bit for the maximum
string length. This can be fixed by introducing an internal function
Tcl_GetStringFromObj2() which has a
size_t * parameter in stead of
Tcl_GetStringFromObj will be converted to a macro, which switches
between the two possible functions depending on the size of the parameter.
This way, we have a compatibility layer, easing the transition to Tcl 9. Extensions can already start using the extended range, even though it actually doesn't have effect in Tcl 8 yet.
See the tip-481 branch in Tcl's fossil repository https://core.tcl.tk/tcl/timeline?r=tip-481 .