Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@dev.tarantool.org, korablev@tarantool.org,
	imun@tarantool.org
Subject: [Tarantool-patches] [PATCH v2 0/3] box_return_mp
Date: Thu, 23 Apr 2020 02:12:38 +0200	[thread overview]
Message-ID: <cover.1587600640.git.v.shpilevoy@tarantool.org> (raw)

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)

             reply	other threads:[~2020-04-23  0:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  0:12 Vladislav Shpilevoy [this message]
2020-04-23  0:12 ` [Tarantool-patches] [PATCH v2 1/3] box: introduce port_c Vladislav Shpilevoy
2020-04-24 12:22   ` Igor Munkin
2020-04-24 22:06     ` Vladislav Shpilevoy
2020-04-23  0:12 ` [Tarantool-patches] [PATCH v2 2/3] box: introduce box_return_mp() public C function Vladislav Shpilevoy
2020-04-24 12:22   ` Igor Munkin
2020-04-27 15:14   ` Nikita Pettik
2020-04-27 21:29     ` Vladislav Shpilevoy
2020-04-27 22:55       ` Nikita Pettik
2020-04-23  0:12 ` [Tarantool-patches] [PATCH v2 3/3] box: replace port_tuple with port_c everywhere Vladislav Shpilevoy
2020-04-25  0:21   ` Igor Munkin
2020-04-26 19:22     ` Vladislav Shpilevoy
2020-04-27  9:12       ` Igor Munkin
2020-04-27  9:18         ` Igor Munkin
2020-04-27 14:10   ` Nikita Pettik
2020-04-28 11:08 ` [Tarantool-patches] [PATCH v2 0/3] box_return_mp Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1587600640.git.v.shpilevoy@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=imun@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 0/3] box_return_mp' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox