[Tarantool-patches] [PATCH 0/4] RFC: Isolate serializer helpers

Alexander Turenko alexander.turenko at tarantool.org
Wed Jun 23 22:12:38 MSK 2021


Moved the serializer helpers into its own compilation unit, add some
comments and a basic test: everything is just to simplify diving into
this code.

Guys, please, look, whether it seems useful enough to include into
tarantool's mainline? Should we name it serializer.[ch] or
somehow like serializer_helpers.[ch]?

Part of https://github.com/tarantool/tarantool/issues/3228
Branch: Totktonada/gh-3228-extract-serializer-helpers

Alexander Turenko (4):
  lua: move serializer helpers into its own file
  lua: move luaL_newserializer() comment into header
  lua: split serializer functions into sections
  test: add a basic unit test for serializer helpers

 src/CMakeLists.txt                |   1 +
 src/box/lua/call.c                |   1 +
 src/box/lua/console.c             |   1 +
 src/box/lua/execute.c             |   1 +
 src/box/lua/info.c                |   1 +
 src/box/lua/init.c                |   2 +
 src/box/lua/serialize_lua.c       |   1 +
 src/box/lua/slab.c                |   1 +
 src/box/lua/tuple.c               |   1 +
 src/box/sql/mem.c                 |   1 +
 src/lua/decimal.c                 |   2 +
 src/lua/fiber.c                   |   1 +
 src/lua/init.c                    |   5 +
 src/lua/msgpack.c                 |   1 +
 src/lua/msgpack.h                 |   1 +
 src/lua/pickle.c                  |   1 +
 src/lua/serializer.c              | 653 ++++++++++++++++++++++++++++++
 src/lua/serializer.h              | 376 +++++++++++++++++
 src/lua/utils.c                   | 601 +--------------------------
 src/lua/utils.h                   | 292 +------------
 test/unit/CMakeLists.txt          |   3 +
 test/unit/serializer.c            | 444 ++++++++++++++++++++
 test/unit/serializer.result       | 135 ++++++
 third_party/lua-cjson/lua_cjson.c |   1 +
 third_party/lua-yaml/lyaml.cc     |   1 +
 25 files changed, 1639 insertions(+), 889 deletions(-)
 create mode 100644 src/lua/serializer.c
 create mode 100644 src/lua/serializer.h
 create mode 100644 test/unit/serializer.c
 create mode 100644 test/unit/serializer.result

-- 
2.31.1



More information about the Tarantool-patches mailing list