mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
tweak: make better use of funptr() macro and sh.bltinfun pointer
src/cmd/ksh93/include/name.h: - Include the ususally-wanted (Shbltin_f) typecast in funptr(). Various files: - Change several direct foo->nvalue.bfp usages to funptr(np). - Reduce explicit typecasts after the name.h change. - To determine if we are (or just were) running a certain built-in command, instead of comparing sh.bltindata.bnode with a builtin table node, use sh.bltinfun to directly compare the builtin's function; this is more readable and efficient.
This commit is contained in:
parent
05fc199c95
commit
cae9af5eec
9 changed files with 16 additions and 16 deletions
|
|
@ -149,7 +149,7 @@ struct Ufunction
|
|||
#define is_abuiltin(n) (nv_isattr(n,NV_BLTIN|NV_INTEGER)==NV_BLTIN)
|
||||
#define is_afunction(n) (nv_isattr(n,NV_FUNCTION|NV_REF)==NV_FUNCTION)
|
||||
#define nv_funtree(n) ((n)->nvalue.rp->ptree)
|
||||
#define funptr(n) ((n)->nvalue.bfp)
|
||||
#define funptr(n) ((Shbltin_f)(n)->nvalue.bfp)
|
||||
|
||||
/* NAMNOD MACROS */
|
||||
/* ... for attributes */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue