Skip to content
Tcl Source Code History Of Ticket 31fedb885e801f4c
Login

History Of Ticket 31fedb885e801f4c

Artifacts Associated With Ticket 31fedb885e801f4c

  1. Ticket change [1a8b5f0699] (rid 238644) by emiliano on 2025-03-25 00:09:34:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      The man page documenting the Tcl functions Tcl_ExprLong(), Tcl_ExprDouble(), Tcl_ExprBoolean() and Tcl_ExprString() omits to mention that these four functions returns TCL_OK and write a zero in the passed in variable if an empty string is provided (*expr == '\0').
      
      This is relevant since evaluating an empty string in Tcl results in a different result.
      
      $ tclsh9.1 
      % expr {}
      empty expression
      in expression ""
      
    5. foundin initialized to: "trunk"
    6. is_private initialized to: "0"
    7. login: "emiliano"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Important"
    11. status initialized to: "Open"
    12. submitter initialized to: "emiliano"
    13. subsystem initialized to: "69. Other"
    14. title initialized to: "Tcl_ExprLong documentation omission"
    15. type initialized to: "Bug"
  2. Ticket change [04a31b4f0a] (rid 238717) by jan.nijtmans on 2025-03-26 19:54:44:

    1. icomment:
      In the code, I see this:
      <pre>
          if (*exprstring == '\0') {
              /*
               * Legacy compatibility - return 0 for the zero-length string.
               */
      
              *ptr = 0;
          } else {
      </pre>
      
      This tells me that this behavior was not intended, but kept for
      compatibility with old versions of Tcl.
      
      Wouldn't it be better to fix this behavior, generating an error-message in this case?
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [ce90df7b29] (rid 238718) by apnadkarni on 2025-03-27 02:51:59:

    1. icomment:
      While I too would prefer fixing this as opposed to changing the documentation, I fear that opportunity might have passed with 9.0 release depending on whether one believes manpages are authoritative or the actual implementation.
      
      Also, Tcl_ExprLongObj etc. may also have the same issue though I have not checked the actual behavior in those cases.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  4. Ticket change [d7e7e26cf2] (rid 238719) by jan.nijtmans on 2025-03-27 07:03:16:

    1. icomment:
      Or ... just deprecate those functions in 9.1 and remove them in 9.2. Or ... deprecate those in 9.0 and remove them in 9.1 ....
      
      I only found 2 extensions still using any of those: Blt and Tix.
      
      > Also, Tcl_ExprLongObj etc. may also have the same issue though I have not checked the actual behavior in those cases.
      
      No, the *Obj() functions are OK, they - correctly - output an error-message in this case.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"