[Tarantool-patches] [PATCH 3/3] box: introduce box_return_mp() public C function

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Apr 23 03:14:43 MSK 2020


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')
 
====================


More information about the Tarantool-patches mailing list