Subject: Re: V01zmodload fails on Cygwin
From: "Jun T." <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 25 Jan 2016 10:28:33 +0900
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On 2016/01/25, at 3:22, Bart Schaefer <[email-masked]> wrote:
> } So it seems some symbols from libzsh-5.2-dev-1.dll also exists
> } in param_private.dll, and gethashnode2 is one of those symbols:
> 
> Interesting.  gethashnode2 should be declared external, so it should
> be resolved for param_private.dll at link time.  Seems to have to do
> with whether the external function is *called* vs. merely referenced
> by name?

I'm not familiar with Cygwin (or Windows) dll.
Maybe create an import library libzsh.a?
Or explicitly dlopen("libzsh.dll") from the param_private.dll and
call dlsym("gethashnode2") ?

> Should probably save/restore ->getnode as well, just
> for completeness.

realparamtab->getnode is already saved in getparamnode in your
original code, and getparamnode() (not gethashnode()) is called
in getprivatenode().
On the other hand, gethashnode2() is called in getprivatenode2().

> Do you want to commit or should I?

Please commit it (with necessary modification if any).