Changeset

10061:5c71693c8345

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 08 Jul 2019 02:44:32 +0200
parents 10060:7a36b7ac309b (diff) 10058:08c6540f5a65 (current diff)
children 10062:6ffed67356e9
files doc/coding_style.txt net/connlisteners.lua net/http/files.lua net/server_epoll.lua tools/migration/migrator/mtools.lua tools/migration/migrator/prosody_files.lua tools/migration/migrator/prosody_sql.lua util/serialization.lua
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/serialization.lua	Thu Jun 20 22:26:46 2019 +0200
+++ b/util/serialization.lua	Mon Jul 08 02:44:32 2019 +0200
@@ -267,10 +267,15 @@
 	return ret;
 end
 
+local default = new();
 return {
 	new = new;
 	serialize = function (x, opt)
-		return new(opt)(x);
+		if opt == nil then
+			return default(x);
+		else
+			return new(opt)(x);
+		end
 	end;
 	deserialize = deserialize;
 };