Skip to content

Commit 7d6679b

Browse files
committed
Ticket [54430c23e3]: revert solution. Tcl_InitStubs is a macro and does this automatically.
1 parent 83999e8 commit 7d6679b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

generic/tclsample.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,10 @@ Sample_Init(
365365
* - "8.1-": 8.1 and any higher version
366366
* - "8.1": 8.1.x to 8.7.x
367367
* - "8.1 9": allow 8.1.x to 8.7.x and 9.x.x, but not 10.x.x
368+
* Note that Tcl_InitStubs is a macro, which is replaced by a Tcl version
369+
* check only, if TCL_STUBS is not defined (e.g. direct link, static build)
368370
*/
369-
#ifdef USE_TCL_STUBS
370-
if (Tcl_InitStubs(interp, "8.1-", 0) == NULL)
371-
#else
372-
if (Tcl_PkgRequire(interp, "Tcl", "8.1-", 0) == NULL)
373-
#endif
374-
{
371+
if (Tcl_InitStubs(interp, "8.1-", 0) == NULL) {
375372
return TCL_ERROR;
376373
}
377374

0 commit comments

Comments
 (0)