From e0e3ed2de96caf76d1065b834ddd4f9ba62a1e55 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 16 Feb 2012 11:20:24 +0200 Subject: beta 2012.02.16 09:55 --- tex/context/base/strc-ini.lua | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'tex/context/base/strc-ini.lua') 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 -- cgit v1.2.3