Software /
code /
prosody
Comparison
util/json.lua @ 5563:678867c552d1
util.json: Make setmetatable local.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 06 May 2013 19:43:59 -0400 |
parent | 5562:a6b8fb827e2a |
child | 5565:6dd806829226 |
comparison
equal
deleted
inserted
replaced
5562:a6b8fb827e2a | 5563:678867c552d1 |
---|---|
11 local s_char = string.char; | 11 local s_char = string.char; |
12 local tostring, tonumber = tostring, tonumber; | 12 local tostring, tonumber = tostring, tonumber; |
13 local pairs, ipairs = pairs, ipairs; | 13 local pairs, ipairs = pairs, ipairs; |
14 local next = next; | 14 local next = next; |
15 local error = error; | 15 local error = error; |
16 local newproxy, getmetatable = newproxy, getmetatable; | 16 local newproxy, getmetatable, setmetatable = newproxy, getmetatable, setmetatable; |
17 local print = print; | 17 local print = print; |
18 | 18 |
19 local has_array, array = pcall(require, "util.array"); | 19 local has_array, array = pcall(require, "util.array"); |
20 local array_mt = has_array and getmetatable(array()) or {}; | 20 local array_mt = has_array and getmetatable(array()) or {}; |
21 | 21 |