* Some Etc/zsh-development-guide updates
@ 2015-07-28 20:47 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2015-07-28 20:47 UTC (permalink / raw)
To: zsh-workers
There's probably more needed, but I was working on a module and found some
very outdated stuff in that section.
diff --git a/Etc/zsh-development-guide b/Etc/zsh-development-guide
index 4d6cefd..cbbc798 100644
--- a/Etc/zsh-development-guide
+++ b/Etc/zsh-development-guide
@@ -751,7 +751,7 @@ the other things that can be defined by modules:
/**/
int
- boot_foo(Module m)
+ boot_(Module m)
{
int ret;
@@ -761,7 +761,7 @@ the other things that can be defined by modules:
...
/**/
int
- cleanup_foo(Module m)
+ cleanup_(Module m)
{
deletehookdefs(m->nam, foohooks, sizeof(foohooks)/sizeof(*foohooks));
...
@@ -802,14 +802,37 @@ The definition is simple:
};
The macro `WRAPDEF(...)' gets the C-function as its only argument.
-This function should be defined like:
+The `boot_()' function must install wrappers by calling `addwrapper()'
+like so:
+
+ /**/
+ int
+ boot_(Module m)
+ {
+ int ret;
+
+ ret = addwrapper(m, wrapper);
+ ...
+ }
+
+The `cleanup_()' function should then remove the wrappers again:
+
+ /**/
+ int
+ cleanup_(Module m)
+ {
+ deletewrapper(m, wrapper);
+ ...
+ }
+
+The wrapper function should be defined like:
/**/
static int
- ex_wrapper(List list, FuncWrap w, char *name)
+ ex_wrapper(Eprog prog, FuncWrap w, char *name)
{
...
- runshfunc(list, w, name);
+ runshfunc(prog, w, name);
...
return 0;
}
@@ -828,11 +851,11 @@ finished:
/**/
static int
- ex_wrapper(List list, FuncWrap w, char *name)
+ ex_wrapper(Eprog prog, FuncWrap w, char *name)
{
if (wrapper_need_to_run) {
...
- runshfunc(list, w, name);
+ runshfunc(prog, w, name);
...
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-28 20:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28 20:47 Some Etc/zsh-development-guide updates Bart Schaefer
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).