summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eshld/eshrt.esh13
1 files changed, 6 insertions, 7 deletions
diff --git a/eshld/eshrt.esh b/eshld/eshrt.esh
index 3d86b79..14f634b 100644
--- a/eshld/eshrt.esh
+++ b/eshld/eshrt.esh
@@ -72,13 +72,12 @@ __fn_ctxsw()
${__fn_tu});;
?*)
# Unset static variables and functions from previous TU.
- case "$(eval "printf '%s' \
- \"\${__${__prev_tu}_static_vars}\"")" \
- in ?*)
+ eval "__val=\${__${__prev_tu}_static_vars}"
+ case "${__val}" in ?*)
eval "unset \${__${__prev_tu}_static_vars}"
;; esac
- for __fn in $(eval printf '%s' \
- "\"\${__${__prev_tu}_static_fns}\""); do
+ eval "__val=\${__${__prev_tu}_static_fns}"
+ for __fn in ${__val}; do
unset -f "${__fn%:*}"
done
;; esac
@@ -88,8 +87,8 @@ __fn_ctxsw()
# Set static variables and function for the current TU.
eval "__val=\${__${__fn_tu}_static_var_vals}"
eval "${__val}"
- for __fn in $(eval printf '%s' \
- "\"\${__${__fn_tu}_static_fns}\""); do
+ eval "__val=\${__${__fn_tu}_static_fns}"
+ for __fn in ${__val}; do
eval "${__fn%:*}() { ${__fn#*:}; }"
done
;; esac