Overview
| Artifact ID: | 2d1736322bdf04ed2311c95f2fc65e0a64f81ef17641d02a9f06a95c797ae62b |
|---|---|
| Ticket: | 6e156333bcf233a26216e3ee3e94f2761e97a34b
Documentation: Contradiction in Tcl_GetSring/Tcl_GetStringFromObj vs Tcl_UpdateStringProc |
| User & Date: | anonymous on 2019-07-23 08:03:44 |
Changes
- closedate changed to: "2458687.83592755"
- closer changed to: "anonymous"
- icomment:
Your comment restates what THE UPDATESTRING FIELD says and I have no issue with that. However, the <code>Tcl_GetString</code> documentation is saying something else: it says you can call <code>Tcl_GetString</code> from the <i>UpdateStringProc</i> to get a modifiable string that you can then change (presumably without changing its length or at most shortening it). But if the bytes member is <code>NULL</code> when <i>UpdateStringProc</i> is called, and <i>UpdateStringProc</i> calls <code>Tcl_GetString</code>, then <code>Tcl_GetString</code> would have no recourse but to call <i>UpdateStringProc</i> again, leading to infinite recursion (unless the type pointer had been changed before calling <code>Tcl_GetString</code>). So how is this supposed to work? (Or should the <code>Tcl_GetString</code> documentation be changed?)
- login: "anonymous"
- mimetype: "text/x-fossil-wiki"
- username: "[email protected]"