From 83999e821daaebd39423a61de9cdf23f90abf095 Mon Sep 17 00:00:00 2001 From: oehhar Date: Mon, 9 Dec 2024 15:23:56 +0000 Subject: [PATCH] Ticket [54430c23e3]: support non-stubs build --- generic/tclsample.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/generic/tclsample.c b/generic/tclsample.c index 08dc20a..5d308cf 100644 --- a/generic/tclsample.c +++ b/generic/tclsample.c @@ -366,7 +366,12 @@ Sample_Init( * - "8.1": 8.1.x to 8.7.x * - "8.1 9": allow 8.1.x to 8.7.x and 9.x.x, but not 10.x.x */ - if (Tcl_InitStubs(interp, "8.1-", 0) == NULL) { +#ifdef USE_TCL_STUBS + if (Tcl_InitStubs(interp, "8.1-", 0) == NULL) +#else + if (Tcl_PkgRequire(interp, "Tcl", "8.1-", 0) == NULL) +#endif + { return TCL_ERROR; }