Overview
| Artifact ID: | b0f933c909d8fa9c14b30ccf5c442242dfffea2d7d5adb571ca563ebf6dc0e67 |
|---|---|
| Ticket: | f4b0cb208044f175bdd669db0b293d0bf3f9108e
Calling Tcl_GetStringFromObj with NULL lengthPtr causes compile error |
| User & Date: | jan.nijtmans on 2021-01-25 10:32:18 |
Changes
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2459239.93910251"
- closer changed to: "jan.nijtmans"
- icomment:
It is true that '0' as argument doesn't work, but NULL does! Since lengthPtr is a pointer to an integer, it - actually - should be (int *)NULL, and that works too. However, since '0' was accepted as argument in Tcl 8.6, we cannot just change that in a minor release, pity. In Tcl 9.0, strings can be larger than MAX_INT, this group of functions should - then - be able to account for that. In Tcl 9.0, either use an (int *)NULL argument, or use the function Tcl_GetString() (which is a macro doing the same). It's a small burden for extensions to make that change, but it opens up the 64-bit world for string lengths, that's what TIP 481 is about. Thanks for your report!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"