version conflict for package "Tcl": TCL_VERSION vs TCL_PATCH_LEVEL



I find the following inconsistent(?) behavior of a self-written
Tcl package with the line

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

in its C source:

* compiled under Tcl 8.4 everything works well (when the package
is loaded under tclsh84 (patchlevel 8.4.12).

* compiled under Tcl 8.5, I can't load the package; the error
message is:

'version conflict for package "Tcl": have 8.5.1, need exactly 8.5'

I could replave TCL_VERSION by TCL_PATCH_LEVEL, but then I would
have to re-compile after each upgrade to the next patchlevel,
wouldn't I?


Is this different behavior intended? Would you usually use
TCL_VERSION or TCL_PATCH_LEVEL in Tcl_PkgRequire()? 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)?


And yes, I know about Tcl_InitStubs() etc. but I would like to
provide an alternative indedpendent of the stubs mechanism.


Olaf

.



Relevant Pages

  • Re: now do you "link" .tcl files?
    ... I think from the position of a newbie, this is how linking in Tcl ... At the time of the call, Tcl looks up the command named "foo" using ... pkgIndex.tcl for a Tcl-only package usually contains ...
    (comp.lang.tcl)
  • Re: Why TCL?
    ... The typical reason you see other languages have things like this is ... Tcl extension packages available as well. ... :And installing the MD5 package for TCL was too painful for me. ... in other scripting language camps wanted something similar. ...
    (comp.lang.tcl)
  • Re: New list commands ... What do you think ?
    ... That's the risk of every developer writing basic commands. ... allow some discussion about some of them, that are really good for core ... runtime consuming and could be done more efficiencly in C using the tcl ... Critcl builds a package which is loaded. ...
    (comp.lang.tcl)
  • Re: set character at string position
    ... > 'stub' for best performance and prettiness. ... Tcl 8.3 and still continue to link and work flawlessly with Tcl 8.5+. ... loads an extension. ... A package is any combination of Tcl and/or compiled C code that is ...
    (comp.lang.tcl)
  • Re: TCL vs. Perl
    ... Mainly, I am a Tcl developer, and I write TONS of databases in ... Downloading packages is cake, use the http package. ... tclIndex file and the paths for Tcl to find them. ... even Latex and PDF documents can be auto-generated by scripts. ...
    (comp.lang.tcl)