From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 8A565469719 for ; Sun, 8 Mar 2020 20:47:37 +0300 (MSK) From: Vladislav Shpilevoy Date: Sun, 8 Mar 2020 18:47:32 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 0/3] box_return_mp List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, korablev@tarantool.org, imun@tarantool.org 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 is not really related to the ticket, but related to struct port, which is touched here. Second 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. Third patch introduces the new public function. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4641-c-function-ret-mp Issue: https://github.com/tarantool/tarantool/issues/4641 @ChangeLog - box_return_mp() - new C API function to return arbitrary MessagePack from stored C functions (gh-4641). Vladislav Shpilevoy (3): box: fix struct port_tuple.size wrong type in Lua box: introduce port_c box: introduce box_return_mp() public C function extra/exports | 1 + src/box/box.cc | 8 +- src/box/box.h | 19 ++++ src/box/func.c | 2 +- src/box/lua/misc.cc | 20 ++++ src/box/lua/schema.lua | 2 +- src/box/port.c | 191 ++++++++++++++++++++++++++++++++++-- src/box/port.h | 50 ++++++++++ src/box/sql/func.c | 22 +++-- test/box/function1.c | 37 +++++++ test/box/function1.result | 31 ++++++ test/box/function1.test.lua | 14 +++ 12 files changed, 375 insertions(+), 22 deletions(-) -- 2.21.1 (Apple Git-122.3)