Skip to content

Commit 906eb52

Browse files
committed
fix module dependencies
1 parent 3fec82c commit 906eb52

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/madl_json.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,8 @@ end
386386

387387
-- MAD extensions --------------------------------------------------------------
388388

389-
local openfile in MAD.utility
390-
391389
function json.write (filnam_, val)
392-
local file = assert(openfile(filnam_, 'w'),
390+
local file = assert(MAD.utility.openfile(filnam_, 'w'),
393391
"unable to open JSON file in write mode")
394392
file:write(json.encode(val))
395393
if is_string(filnam_) then file:close() else file:flush() end
@@ -400,7 +398,7 @@ function json.print (val)
400398
end
401399

402400
function json.read (filnam_)
403-
local file = assert(openfile(filnam_, 'r'),
401+
local file = assert(MAD.utility.openfile(filnam_, 'r'),
404402
"unable to open JSON file in read mode")
405403
local val = json.decode(file:read("*a"))
406404
if is_string(filnam_) then file:close() end

0 commit comments

Comments
 (0)