Compare the following:
Tcl_InitStubs(interp, "8.5", 0)
The version parameter of XX_InitStubs means the
lowest version supported by this extension. However,
in TclOO this value is already filled in being TCLOO_VERSION,
which is the "compiled-against" version.
The problem with this is, when someone compiles an extension
using TCLOO_VERSION = "0.6.3", but runs it with Tcl 8.6b1,
the XXInitStubs call will fail, even though it should run perfectly.
There is a difference between the "lowest supported version",
and the "compiled against" version. It should be possible to
compile a TclOO extesion against TclOO 0.6.3 and run it
using TclOO 0.6.2: As long as no 0.6.3-specific features are
used (and the extension developer is the only one knowing
this), everything should be fine.
More specific, I suggest to change:
#define Tcl_OOInitStubs(interp) \ Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION,0)
#define Tcl_OOInitStubs(interp, version) \ Tcl_PkgRequire((interp),"TclOO", version, 0)
Maybe we should even have an "exact'
parameter, just as the other *StubInit functions.
This needs to be coordinated with Itcl and tdbc,
because it introduces a source incompatiblility!
Binary compatibility is not affected, except for
the "exact" parameter!
B.T.W: Tdbc_InitStubs has the same problem, but
Itcl_InitStubs is O.K.
B.T.W.: Personally, I don't mind very much about the
"exact' parameter, but I could imagine the desire
to keep it exactly the same as Tcl.