From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 6313E4696C4 for ; Thu, 23 Apr 2020 03:14:45 +0300 (MSK) References: <20200403141301.GT22874@tarantool.org> From: Vladislav Shpilevoy Message-ID: <8a97c6c9-d03c-40be-dd6b-ebcbd55a83bc@tarantool.org> Date: Thu, 23 Apr 2020 02:14:43 +0200 MIME-Version: 1.0 In-Reply-To: <20200403141301.GT22874@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 3/3] box: introduce box_return_mp() public C function List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Thanks for the review! >> diff --git a/test/box/function1.result b/test/box/function1.result >> index b91d63c51..301f666ef 100644 >> --- a/test/box/function1.result >> +++ b/test/box/function1.result >> @@ -791,6 +791,37 @@ box.schema.func.drop("function1.multireturn") >> --- >> ... >> -- >> +-- gh-4641: box_return_mp() C API to return arbitrary MessagePack >> +-- from C functions. >> +-- >> +name = 'function1.test_return_mp' >> +--- >> +... >> +box.schema.func.create(name, {language = "C", exports = {'LUA'}}) >> +--- >> +... >> +box.func[name]:call() >> +--- >> +- 1 >> +- -1 >> +- 18446744073709551615 >> +- '123456789101112131415' >> +- [2] >> +... >> +box.schema.user.grant('guest', 'super') >> +--- >> +... > > Minor: I guess it worth to add a comment below referring the #4799 since > I was confused with the output below. Fair. ==================== diff --git a/test/box/function1.result b/test/box/function1.result index 301f666ef..905a4cdab 100644 --- a/test/box/function1.result +++ b/test/box/function1.result @@ -811,6 +811,8 @@ box.func[name]:call() box.schema.user.grant('guest', 'super') --- ... +-- Netbox:call() returns not the same as local call for C +-- functions, see #4799. net:connect(box.cfg.listen):call(name) --- - [1, -1, 18446744073709551615, '123456789101112131415', [2]] diff --git a/test/box/function1.test.lua b/test/box/function1.test.lua index 670d63a44..ab7b586a0 100644 --- a/test/box/function1.test.lua +++ b/test/box/function1.test.lua @@ -277,6 +277,8 @@ box.schema.func.create(name, {language = "C", exports = {'LUA'}}) box.func[name]:call() box.schema.user.grant('guest', 'super') +-- Netbox:call() returns not the same as local call for C +-- functions, see #4799. net:connect(box.cfg.listen):call(name) box.schema.user.revoke('guest', 'super') ====================