mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-23 17:01:05 +02:00
Jun T.: 37759: save more function pointers from realparamtab when hacking in their replacements
Restoring from the original external symbols fails for some dynamic link schemes (e.g. 64bit Cygwin).
This commit is contained in:
parent
7c59c953f2
commit
1d98f77a9b
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2016-01-25 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Jun T.: 37759: Src/Modules/param_private.c: save more function
|
||||
pointers from realparamtab when hacking in their replacements,
|
||||
because restoring from the original external symbols fails for
|
||||
some dynamic link schemes (e.g. 64bit Cygwin).
|
||||
|
||||
2016-01-25 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 37765: Src/builtin.c, Test/C04funcdef.ztst: Use FS_FUNC on
|
||||
|
|
|
@ -490,7 +490,7 @@ wrap_private(Eprog prog, FuncWrap w, char *name)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static HashNode (*getparamnode) _((HashTable, const char *));
|
||||
static GetNodeFunc getparamnode;
|
||||
|
||||
/**/
|
||||
static HashNode
|
||||
|
@ -567,6 +567,8 @@ static struct features module_features = {
|
|||
};
|
||||
|
||||
static struct builtin save_local;
|
||||
static GetNodeFunc save_getnode2;
|
||||
static ScanFunc save_printnode;
|
||||
static struct reswd reswd_private = {{NULL, "private", 0}, TYPESET};
|
||||
|
||||
/**/
|
||||
|
@ -577,6 +579,8 @@ setup_(UNUSED(Module m))
|
|||
|
||||
/* Horrible, horrible hack */
|
||||
getparamnode = realparamtab->getnode;
|
||||
save_getnode2 = realparamtab->getnode2;
|
||||
save_printnode = realparamtab->printnode;
|
||||
realparamtab->getnode = getprivatenode;
|
||||
realparamtab->getnode2 = getprivatenode2;
|
||||
realparamtab->printnode = printprivatenode;
|
||||
|
@ -624,8 +628,8 @@ cleanup_(Module m)
|
|||
removehashnode(reswdtab, "private");
|
||||
|
||||
realparamtab->getnode = getparamnode;
|
||||
realparamtab->getnode2 = gethashnode2;
|
||||
realparamtab->printnode = printparamnode;
|
||||
realparamtab->getnode2 = save_getnode2;
|
||||
realparamtab->printnode = save_printnode;
|
||||
|
||||
deletewrapper(m, wrapper);
|
||||
return setfeatureenables(m, &module_features, NULL);
|
||||
|
|
Loading…
Reference in a new issue