Skip to content
Tcl Source Code History Of Ticket 1464039fffffffff
Login

History Of Ticket 1464039fffffffff

Artifacts Associated With Ticket 1464039fffffffff

  1. Ticket change [559862a85b] (rid 94164) by vincentdarley on 2006-04-04 07:56:10:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
      
      
      
    4. foundin initialized to: "obsolete: 8.5a4"
    5. priority initialized to: "7 High"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "vincentdarley"
    9. subsystem initialized to: "13. Index Object"
    10. title initialized to:
      Tcl_GetIndexFromObj doesn't like zero length strings
      
    11. type initialized to: "Bug"
  2. Ticket change [c5a3c3e9a5] (rid 112032) by dgp on 2006-04-05 00:22:30:

    1. 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 ?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [95a0f7db59] (rid 106188) by nobody on 2006-04-05 01:48:36:

    1. 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.
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  4. Ticket change [980c19d8a5] (rid 110543) by dkf on 2006-04-05 20:03:06:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      Fixed in 8.5 (empty string is exact-matched only; never a
      prefix). Also added tests.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. username: "dkf"
  5. Ticket change [d164d9aa55] (rid 113337) by dkf on 2006-04-05 20:20:34:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Fixed on 8.4 branch too
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. status changed to: "Closed"
    5. username: "dkf"
  6. Ticket change [e83002e3c3] (rid 104609) by dkf on 2006-04-05 20:20:35:

    1. closedate changed to: "2006-04-05T13:20:35"
    2. closer changed to: "dkf"
  7. Ticket change [8a579f883b] (rid 127380) by dgp on 2006-04-05 21:03:45:

    1. 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.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [85dc24ef62] (rid 131396) by dgp on 2006-04-05 22:17:35:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      revisions committed.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [cd658d1ac0] (rid 95883) by dgp on 2006-04-07 01:58:06:

    1. 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...
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"