-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unset non-namespace funct. from within namespace (re: dbccda1)
The referenced commit more or less accidentally worked because it set 'name' to the namespace-prefixed function name, which then triggered the code at the bottom of unall() to set a dummy node in the virtual subshell. However, this also bypassed the lookup for the non-namespaced name, which made it impossible to unset a function defined outside a namespace from within the namespace. src/cmd/ksh93/bltins/typeset.c: unall(): - When prefixing the namespace name, use a local 'nsname' for the prefixed name and do not change 'name'. This fixes the bug, but on its own this fix would also reintroduce the subshell bug. - To avoid that, add code to set a dummy node in a virtual subshell for a namespace function. If that is done, simply return, because nothing else needs doing now.
- Loading branch information
Showing
3 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters