diff options
author | Marius <mariausol@gmail.com> | 2012-02-16 11:20:24 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-02-16 11:20:24 +0200 |
commit | e0e3ed2de96caf76d1065b834ddd4f9ba62a1e55 (patch) | |
tree | 077ac0ae3f821511a51bc2118a99f5ad62dae83b /tex/context/base/strc-ini.lua | |
parent | 620e890d8993f2a1120b5069f97b01ca1841f50f (diff) | |
download | context-e0e3ed2de96caf76d1065b834ddd4f9ba62a1e55.tar.gz |
beta 2012.02.16 09:55
Diffstat (limited to 'tex/context/base/strc-ini.lua')
-rw-r--r-- | tex/context/base/strc-ini.lua | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tex/context/base/strc-ini.lua b/tex/context/base/strc-ini.lua index 923d35f6d..8644c87e3 100644 --- a/tex/context/base/strc-ini.lua +++ b/tex/context/base/strc-ini.lua @@ -115,10 +115,23 @@ end local helpers = structures.helpers -function helpers.touserdata(str) - local hash = str and str ~= "" and settings_to_hash(str) - if hash and next(hash) then - return hash +-- function helpers.touserdata(str) +-- local hash = str and str ~= "" and settings_to_hash(str) +-- if hash and next(hash) then +-- return hash +-- end +-- end + +function helpers.touserdata(data) + if type(data) == "string" then + if data == "" then + return nil + else + data = settings_to_hash(data) + end + end + if data and next(data) then + return data end end |