diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-07-14 10:01:25 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-07-14 10:01:25 +0200 |
commit | e00d066f7a7cb1ffd8df94d90e16565c3dedeec7 (patch) | |
tree | c9893c780ccc05c8f5402b8bf09caf361cbeea86 /lualibs-util-tab.lua | |
parent | f2f35fe3d8a1c5ce74ddbb8eef3cad2b18a379dc (diff) | |
download | lualibs-e00d066f7a7cb1ffd8df94d90e16565c3dedeec7.tar.gz |
sync with Context as of 2013-07-14
Diffstat (limited to 'lualibs-util-tab.lua')
-rw-r--r-- | lualibs-util-tab.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lualibs-util-tab.lua b/lualibs-util-tab.lua index b7db4fa..f18c719 100644 --- a/lualibs-util-tab.lua +++ b/lualibs-util-tab.lua @@ -293,13 +293,12 @@ function tables.encapsulate(core,capsule,protect) end end --- we no longer have %q in keys as for this kind of tables we can --- assume sane keys +-- best keep [%q] keys (as we have some in older applications i.e. saving user data -local f_hashed_string = formatters["[%s]=%q,"] -local f_hashed_number = formatters["[%s]=%s,"] -local f_hashed_boolean = formatters["[%s]=%l,"] -local f_hashed_table = formatters["[%s]="] +local f_hashed_string = formatters["[%q]=%q,"] +local f_hashed_number = formatters["[%q]=%s,"] +local f_hashed_boolean = formatters["[%q]=%l,"] +local f_hashed_table = formatters["[%q]="] local f_indexed_string = formatters["%q,"] local f_indexed_number = formatters["%s,"] @@ -521,7 +520,7 @@ local serialize = table.serialize -- the extensive one, the one we started with function table.serialize(root,name,specification) - if specification then + if type(specification) == "table" then return serialize(root,name,specification) -- the original one end |