summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@alpinelinux.org>2013-06-29 08:42:04 -0700
committerNathan Angelacos <nangel@alpinelinux.org>2013-06-29 08:42:04 -0700
commit3ded2397d4964b8ff8f5c534b36b73ec6da117dc (patch)
treef3b2e8a0a2bb3191a1efd71ee8ec6e507f1941f5 /src
parent3fa387d66e9287c69936125f5f5f291254275d8a (diff)
downloadhaserl-3ded2397d4964b8ff8f5c534b36b73ec6da117dc.tar.bz2
haserl-3ded2397d4964b8ff8f5c534b36b73ec6da117dc.tar.xz
Apply sf haserl ticket #3 - fix runtime for lua-5.2
Diffstat (limited to 'src')
-rw-r--r--src/haserl_lualib.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/haserl_lualib.lua b/src/haserl_lualib.lua
index b3adfbe..c2b6bdd 100644
--- a/src/haserl_lualib.lua
+++ b/src/haserl_lualib.lua
@@ -25,7 +25,7 @@ haserl, FORM, ENV, COOKIE, HASERL, GET, POST = {}, {}, {}, {}, {}, {}, {}
function haserl.setfield (f, v)
-- From programming in Lua 1st Ed.
local t = _G -- start with the table of globals
- for w, d in string.gfind(f, '([%w_%-]+)(.?)') do
+ for w, d in string.gmatch(f, '([%w_%-]+)(.?)') do
if (tonumber(w)) then
w = tonumber(w)
end
@@ -40,7 +40,7 @@ end
function haserl.getfield (f)
local v = _G -- start with the table of globals
- for w in string.gfind(f, '[%w_]+') do
+ for w in string.gmatch(f, '[%w_]+') do
v = v[w]
end
return v