Overview
| Artifact ID: | 98aecc9ff5ffc17513d24031cc1f89abf253dcac |
|---|---|
| Ticket: | 3363556fffffffffffffffffffffffffffffffff
Tcl_SetObjResult can't handle NULL, despite documentation |
| User & Date: | msofer on 2011-07-12 19:52:02 |
Changes
- icomment:
I could only find an inline comment (in the function argument list) stating that NULL is converted to empty, but it does not correspond exactly to your quote. That comment is indeed NOT in agreement with the code, one of the two should (and will) be fixed. I couldn't find any docs mentioning Tcl_SetObjResult's ability to handle a NULL objPtr. The manual page for Tcl_SetObjResult describes pretty much what the code is doing: "Tcl_SetObjResult arranges for objPtr to be the result for interp, replacing any existing result. The result is left pointing to the object referenced by objPtr. objPtr's reference count is incremented since there is now a new reference to it from interp. The reference count for any old result object is decremented and the old result object is freed if no references to it remain." This part of the man page SetResult.3 seems to have been unchanged since 1998-03-26 Which documentation are you quoting from?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"