Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [RFC] zsh/zpython module



On Mon, 28 Jan 2013 07:44:35 +0300 (FET)
zyx@xxxxx wrote:
> I guess I need getvalue[1] and the same switch as here[2] to get
> parameter with its type.

getvalue's the right way in if you're supporting accesses to partial
arrays, for example, although there ought to be simpler ways of
e.g. simply retrieving a pamraeter expression as a string, as is done in
other modules -- although most other modules make more limited use of
parameters, and the one that doesnt, zsh/parameter, is mostly there to
define new parameters so isn't much use as a reference.  What
zsh/parameter might help with is showing you how to access functions
etc. since some of the parameters give you back doors for manipluating
them.

>  Am I right that I have to use only functions that are prefixed with
> “mod_export”?

Yes, however there's no major penalty in exporting other functions.  We
never sat down and defined a complete API, so if you need to mark
another function as mod_export that's OK.

In practice, mod_export may be largely redundant: of the systems I've
encountered, only AIX actually needs the functions marking specially for
the linker, which is what mod_export is for.

pws



Messages sorted by: Reverse Date, Date, Thread, Author