Re: version conflict for package "Tcl": TCL_VERSION vs TCL_PATCH_LEVEL



Donald G Porter <dgp@xxxxxxxx>:
Olaf Dietrich wrote:

Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1)

... How could
I make my Tcl extension be loadable under all patchlevels
of a given Tcl version (but *not* under a different minor
or major version)?

Replace the Tcl_PkgRequire() call above with:

Tcl_InitStubs(interp, TCL_VERSION, 1);

Okay, so _without_ stubs, you recommend to use

Tcl_InitStubs(interp, TCL_VERSION, 1);

(works with all patchlevels of the MAJ.MIN version)
and _with_ stubs:

Tcl_InitStubs(interp, TCL_VERSION, 0);

(works with newer minor versions as well).

The results of a first test look reasonable.

Thanks,
Olaf
.