[Tarantool-patches] [PATCH v2 0/3] box_return_mp

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Apr 23 03:12:38 MSK 2020


The patchset extends the public C API with a function
box_return_mp(). It allows to return arbitrary MessagePack from
user's code.

First patch introduces a new struct port - port_c. It replaces
port_tuple for stored C functions, and is able to store both
tuples and raw MessagePack.

Second patch introduces the new public function.

Third patch removes no longer needed struct port_tuple, since it
appeared to be not faster than struct port_c.

Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4641-c-function-ret-mp
Issue: https://github.com/tarantool/tarantool/issues/4641

Changes in v2:
- Review fixes for comments from Nikita and Igor;
- port_tuple is removed.

Vladislav Shpilevoy (3):
  box: introduce port_c
  box: introduce box_return_mp() public C function
  box: replace port_tuple with port_c everywhere

 extra/exports               |   1 +
 src/box/box.cc              |  12 ++-
 src/box/box.h               |  19 ++++
 src/box/execute.c           |  10 +-
 src/box/execute.h           |  13 ++-
 src/box/func.c              |   2 +-
 src/box/key_list.c          |   4 +-
 src/box/lua/execute.c       |   6 +-
 src/box/lua/misc.cc         |  18 ++--
 src/box/lua/schema.lua      |  29 +++---
 src/box/port.c              | 201 +++++++++++++++++++++++++-----------
 src/box/port.h              |  91 ++++++++--------
 src/box/sql/func.c          |  22 ++--
 src/lib/core/port.h         |   4 +-
 test/box/function1.c        |  37 +++++++
 test/box/function1.result   |  33 ++++++
 test/box/function1.test.lua |  16 +++
 17 files changed, 367 insertions(+), 151 deletions(-)

-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list