projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util.stanza: Optimisation, remove useless if...then in stanza:children() iterator
[prosody.git]
/
util
/
serialization.lua
diff --git
a/util/serialization.lua
b/util/serialization.lua
index 07a099c910533cc1c95df93fc19fcb7a679dfda6..bad2fe43dddf7cc0b7ec17da6892f10dffe4f646 100644
(file)
--- a/
util/serialization.lua
+++ b/
util/serialization.lua
@@
-1,6
+1,6
@@
-- Prosody IM
-- Prosody IM
--- Copyright (C) 2008-20
09
Matthew Wild
--- Copyright (C) 2008-20
09
Waqas Hussain
+-- Copyright (C) 2008-20
10
Matthew Wild
+-- Copyright (C) 2008-20
10
Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
@@
-35,7
+35,7
@@
local function _simplesave(o, ind, t, func)
elseif type(o) == "string" then
func(t, (("%q"):format(o):gsub("\\\n", "\\n")));
elseif type(o) == "table" then
elseif type(o) == "string" then
func(t, (("%q"):format(o):gsub("\\\n", "\\n")));
elseif type(o) == "table" then
- if next(o) then
+ if next(o)
~= nil
then
func(t, "{\n");
for k,v in pairs(o) do
func(t, indent(ind));
func(t, "{\n");
for k,v in pairs(o) do
func(t, indent(ind));