Overview
| Artifact ID: | 197652ac6662c0e7d87f901e22315002ddfe66f7fc23deadeab50c657c30234d |
|---|---|
| Ticket: | 70f3b23caddc1a1cf77a3f7ed7daa6f9f6405ee5
Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed? |
| User & Date: | oehhar on 2024-12-15 17:58:58 |
Changes
- 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 "-" character 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] THanks to Francois to point-out this issue. - login: "oehhar"
- mimetype: "text/plain"