zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: <zsh-workers@sunsite.auc.dk>
Subject: RE: Module hierarchies, aliasing, and dependencies
Date: Thu, 14 Sep 2000 21:15:37 +0400	[thread overview]
Message-ID: <005201c01e6f$6696b5d0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <1000914163650.ZM12492@candle.brasslantern.com>

>
> It *was* my assumption that the file name relative to $module_path would
> be the single argument to zmodload when loading the module, but of course
> there's no particular reason to assume that, either.
>
> } zmodload -f /path/to/my/module.so zsh/zle
>
> That would be fine, except that it requires you to know the full path
> to the module and the shared object extension, so it won't work in a
> cross-platform way.  How about instead something like
>

It depends on usage pattern. I think about it as developers aid in the first
place. In this case you definitely know path name and extension :-)

But nothing prevents relative pathnames like

zmodload -f relative/path zsh/zle

that would be interpreted in usual way (search through module_path adding
system-specific extension).

>
> I suggest that, for the first pass, the "module identification" can be
> limited to the base name of the shared object; unless I misunderstand
> what you said about Windows DLLs, it won't work to load two DLLs with
> the same base name anyway (at least not without a major rewrite, and
> maybe not even then).
>

The worst case is that currently even zsh/foo and bar/foo may clash. But this
happens to my best knowledge only if we use implicit linking (I believe,
Microsoft calls it compile-time). We can load two DLLs with the same base
names using dlopen() and dlsym() will work correctly. IIRC :-) I must check.
What may not work, if zsh/bar depends on (is linked with) zsh/foo and my/bar
depends on my/foo. I am afraid, that Windows will search only one of */foo
DLLs even if we explicitly load both.


-andrej


  reply	other threads:[~2000-09-14 17:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-09 17:20 Bart Schaefer
2000-09-10 21:16 ` Peter Stephenson
2000-09-10 21:35   ` Zefram
2000-09-10 22:29     ` Bart Schaefer
2000-09-14 15:18       ` Andrej Borsenkow
2000-09-14 16:36         ` Bart Schaefer
2000-09-14 17:15           ` Andrej Borsenkow [this message]
2000-09-15 18:14           ` Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='005201c01e6f$6696b5d0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).