projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "jshn: only keep UP_* variables around while they are needed"
[project/libubox.git]
/
sh
/
jshn.sh
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index
6bf4be2
..
bf76edb
100644
(file)
--- a/
sh/jshn.sh
+++ b/
sh/jshn.sh
@@
-90,7
+90,6
@@
_json_close_table() {
_json_get_var _s_cur JSON_CUR
_json_get_var "${JSON_PREFIX}JSON_CUR" "U_$_s_cur"
_json_get_var _s_cur JSON_CUR
_json_get_var "${JSON_PREFIX}JSON_CUR" "U_$_s_cur"
- unset "${JSON_PREFIX}U_$_s_cur"
}
json_set_namespace() {
}
json_set_namespace() {
@@
-256,7
+255,6
@@
json_select() {
[[ "$1" == ".." ]] && {
_json_get_var cur JSON_CUR
_json_get_var cur "U_$cur"
[[ "$1" == ".." ]] && {
_json_get_var cur JSON_CUR
_json_get_var cur "U_$cur"
- unset "${JSON_PREFIX}U_$cur"
_json_set_var JSON_CUR "$cur"
return 0
}
_json_set_var JSON_CUR "$cur"
return 0
}
@@
-264,7
+262,6
@@
json_select() {
case "$type" in
object|array)
json_get_var cur "$target"
case "$type" in
object|array)
json_get_var cur "$target"
- _json_get_var "${JSON_PREFIX}U_$cur" JSON_CUR
_json_set_var JSON_CUR "$cur"
;;
*)
_json_set_var JSON_CUR "$cur"
;;
*)