Re: Multiple versions of static packages



Nicolas Castagne wrote:
With such a mechanism, I don't see how I can declare the existence of
multiple versions of the "same" static package.

In particular, the function Tcl_StaticPackage(...) does not have a
"version" parameter.

The names of these routines cause a lot of confusion. I've gotten
seriously off track in the past due to the same confusion.

The Tcl function Tcl_StaticPackage(), contrary to what you might expect
based on its name, has *nothing* to do with the [package] command.
Instead it is only connected to the [load] command. When you are
reading the docs for Tcl_StaticPackage() and they refer to "the package",
those docs are not referring to something you can [package require].
They are referring to something you can [load].

An example usage of the routine is in the code for wish, in its
Tcl_AppInit() routine:

if (Tk_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);

The effect of calling Tcl_StaticPackage() is that the result of
[info loaded] will include the element {{} Tk} and the command
[load {} Tk $slave] will function. Note there are no version numbers
in this machinery either. [load]able units of code are tracked by
name alone.

Having pointed out and clarified that confusing matter, is that enough
for you to proceed?

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.



Relevant Pages

  • Re: Ran ccmclean on site server, what are implications???
    ... i ran the synctool command line in a cmd running under system account using ... The sync tool only has to retrieve the files from the distribution share ... only created the package folder. ... baffles me that the advanced client that resides on the sms ...
    (microsoft.public.sms.setup)
  • Re: What are the core packages for a desktops Linux desktop distribution?
    ... Your use of the term package is a bit confusing ... You'll need the mount command as well. ... As for Gnome, if you are going for minimalism, I ... wouldn't install it - you don't need it. ...
    (comp.os.linux.misc)
  • Re: Life on the Command Line
    ... Gutsy as the IM package or the ICQ package. ... There are a lot of games you can play in the Command Line, ... terminals in one window (like tabbing, except it can be used everywhere, ...
    (Ubuntu)
  • 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: perl menubased user interface
    ... actually use a perl package OR a hash for this, In a "perl package" ... sub map_method { ... # and they're all shell commands. ... Do whatever you want to wrap a shell command. ...
    (comp.lang.perl.misc)