Artifacts Associated With Ticket 1464039fffffffffffffffffffffffffffffffff
Ticket change [559862a85b] (rid 94164) by vincentdarley on 2006-04-04 07:56:10:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
See Tk bug 1463233 for more details: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1463233&group_id=12997 Basically, Tk's text widget tag option configuration allows (naturally) the empty string as a valid configuration value (to indicate that the tag does not override the text widget for that item). This works for all other configuration types, but not for indices from string lists. The root cause of the problem is that Tcl_GetIndexFromObj throws an error in this case, even though there is an exact match available (and nowhere in the documentation is it stated that an exact match will not be found for the special case of an empty string). An apparent fix would be: /* * The key should not be empty, otherwise it's not a match. */ if (key[0] == '\0') { + + /* + * Check for special case of "" in string table. + */ + for (entryPtr = tablePtr, i = 0; *entryPtr != NULL; + entryPtr = NEXT_ENTRY(entryPtr, offset), i++) { + if (**entryPtr == '\0') { + index = i; + goto done; + } + } + goto error; } /* * Scan the table looking for one of: Note that this does NOT give the empty string any special treatment - it simply equalises the treatment with what happens with any other prefix string. If there is an exact match to any prefix string it is accepted, even if there are longer strings which could also match. Vince. - foundin initialized to: "obsolete: 8.5a4"
- priority initialized to: "7 High"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vincentdarley"
- subsystem initialized to: "13. Index Object"
- title initialized to:
Tcl_GetIndexFromObj doesn't like zero length strings
- type initialized to: "Bug"
Ticket change [c5a3c3e9a5] (rid 112032) by dgp on 2006-04-05 00:22:30:
- icomment:
Logged In: YES user_id=80530 I get it now thanks. This is a bug that needs a fix. Isn't it a simpler fix to just delete lines 196-203 of tclIndexObj.c ?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [95a0f7db59] (rid 106188) by nobody on 2006-04-05 01:48:36:
- icomment:
Logged In: NO Indeed, you're right. The better fix is to remove those lines (although would want to check if that causes any tcl test suite problems). Vince.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [980c19d8a5] (rid 110543) by dkf on 2006-04-05 20:03:06:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Fixed in 8.5 (empty string is exact-matched only; never a prefix). Also added tests.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "dkf"
Ticket change [d164d9aa55] (rid 113337) by dkf on 2006-04-05 20:20:34:
- icomment:
Logged In: YES user_id=79902 Fixed on 8.4 branch too
- login: "dkf"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dkf"
- icomment:
Ticket change [e83002e3c3] (rid 104609) by dkf on 2006-04-05 20:20:35:
- closedate changed to: "2006-04-05T13:20:35"
- closer changed to: "dkf"
Ticket change [8a579f883b] (rid 127380) by dgp on 2006-04-05 21:03:45:
- icomment:
Logged In: YES user_id=80530 note that this changes some error messages causing some other test suite failures. Also, this patch fails to accept the empty string as a unique prefix for the option in a single option table. That doesn't make sense to me.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [85dc24ef62] (rid 131396) by dgp on 2006-04-05 22:17:35:
- icomment:
Logged In: YES user_id=80530 revisions committed.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [cd658d1ac0] (rid 95883) by dgp on 2006-04-07 01:58:06:
- icomment:
Logged In: YES user_id=80530 revisions reverted. dkf called this one right, thinking more carefully about the expectations of existing extensions. I dislike the inconsistency, but I guess I dislike breaking things more. :P:P:P Committing the change back...
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment: