Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 062caa7aa873a1ad26f482ee2af1cf1333663cc25350ea0718537cdfa1eb0f02
Ticket: 70f3b23caddc1a1cf77a3f7ed7daa6f9f6405ee5
Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed?
User & Date: oehhar on 2024-12-15 17:46:31
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    The wiki page for extension migration [https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9&p] contains:
    
    <verbatim>
    #ifdef USE_TCL_STUBS
        if (Tcl_InitStubs(interp, "8.5-", 0) == NULL)
    #else
        if (Tcl_PkgRequire(interp, "Tcl", "8.5-", 0) == NULL)
    #endif
        {
            return TCL_ERROR;
        }
    </verbatim>
    
    This might be wrong in two senses:
    
       *   The #ifdef is not required, as without defining USE_TCL_STUBS, "Tcl_InitStubs" works like "Tcl_PkgRequire"
      *   Following the Tcl_InitStubs documentation, the "-" charter is not allowed within the argument.
    
    Also, the sample extension is related here.
    
    Here is the TCL 8.6. description stating, that only numbers and dots are allowed:
    [https://core.tcl-lang.org/tcl/file?name=doc/InitStubs.3&ci=84c07aaa29698bb8&ln=23-24]
    IMHO, the "PackageRequire" capability without "USE_TCL_STUBS" is also undocumented.
    
    Here is the 9.0 (main) description which is identical:
    [https://core.tcl-lang.org/tcl/file?udc=1&ln=on&ci=tip&name=doc%2FInitStubs.3]
    
  5. foundin changed to: "8.6 - 9.0"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "70. Sample Extension"
  15. title changed to:
    Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed?
    
  16. type changed to: "Bug"