Check-in [5441fa571a]

Login

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

Overview
Comment:missing minus sign (quite important ....)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:5441fa571a58e5a28bbe7ba1432dd6814753eed7d76df71c2ac953c0d70f3c8c
User & Date: jan.nijtmans 2018-08-23 13:27:22
Context
2018-08-23
15:22
Slight formatting, and adding a link to the related Sqlite change. check-in: cf60913448 user: jan.nijtmans tags: trunk
13:27
missing minus sign (quite important ....) check-in: 5441fa571a user: jan.nijtmans tags: trunk
13:23
Enhance TIP #514 rationale check-in: 68cc144274 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tip/514.md.

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 * On all platforms, the int() math function is modified to do 64-bit truncation, as it already does on [LP64/ILP64](https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models) systems (e.g. 64-bit Linux).
   int() will thus become synonym for wide(). The wide() function will become deprecated in Tcl 9.0, but it will not be removed yet.

 * The ranges of "string is integer" and "string is wideinteger" are changed to match the range of the int()/wide() math function.
   So these functions will report true (1) if the number is in the range -9223372036854775808..9223372036854775807.
   The "string is wideinteger" command will be deprecated in Tcl 9.0, but it will not be removed yet.

 * The C function Tcl\_GetIntFromObj() is changed to return TCL\_OK if the Tcl_Obj contains values in the range of 2147483648..4294967295. So,
   it succeeds if the number fits in either a platform "int", either a platform "unsigned int" type.

 * The C function Tcl\_GetLongFromObj() is changed to behave like Tcl\_GetIntFromObj() if sizeof(long) == sizeof(ing), and to behave like Tcl\_GetWideIntFromObj() if sizeof(long) == sizeof(Tcl_WideInt)

# Implementation

Currently, the proposed implementation is available in the [all-wideint branch]
(https://core.tcl.tk/tcl/timeline?r=all-wideint). (WIP)

# Copyright

This document has been placed in the public domain.







|












69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 * On all platforms, the int() math function is modified to do 64-bit truncation, as it already does on [LP64/ILP64](https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models) systems (e.g. 64-bit Linux).
   int() will thus become synonym for wide(). The wide() function will become deprecated in Tcl 9.0, but it will not be removed yet.

 * The ranges of "string is integer" and "string is wideinteger" are changed to match the range of the int()/wide() math function.
   So these functions will report true (1) if the number is in the range -9223372036854775808..9223372036854775807.
   The "string is wideinteger" command will be deprecated in Tcl 9.0, but it will not be removed yet.

 * The C function Tcl\_GetIntFromObj() is changed to return TCL\_OK if the Tcl_Obj contains values in the range of -2147483648..4294967295. So,
   it succeeds if the number fits in either a platform "int", either a platform "unsigned int" type.

 * The C function Tcl\_GetLongFromObj() is changed to behave like Tcl\_GetIntFromObj() if sizeof(long) == sizeof(ing), and to behave like Tcl\_GetWideIntFromObj() if sizeof(long) == sizeof(Tcl_WideInt)

# Implementation

Currently, the proposed implementation is available in the [all-wideint branch]
(https://core.tcl.tk/tcl/timeline?r=all-wideint). (WIP)

# Copyright

This document has been placed in the public domain.