From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [tarantool-patches] Re: [PATCH v3 2/6] box: rework box_lua_{call, eval} to use input port References: <20190617093552.GE9393@atlas> From: Kirill Shcherbatov Message-ID: Date: Mon, 17 Jun 2019 13:27:13 +0300 MIME-Version: 1.0 In-Reply-To: <20190617093552.GE9393@atlas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit To: tarantool-patches@freelists.org, Konstantin Osipov Cc: vdavydov.dev@gmail.com List-ID: On 17.06.2019 12:35, Konstantin Osipov wrote: > * Kirill Shcherbatov [19/06/13 17:18]: >> Re-factor box_lua_call and box_lua_eval so that they don't take >> call_request. This approach is more scalable: in case of a >> functional index, the user expects to see a tuple with field >> names so we should be able to pass not only raw msgpack, but >> also a tuple to a Lua call so we need an universal way to pass >> arguments to _call methods. > > I think get_msgpack() is a violation of encapsulation - you call > "get_msgpack" to later push the port arguments to C stack, is that > right? So you should call port:dump_c() instead, shouldn't you? No, this is msgpack serializer; not to obuf, but as a memory region. In further patches this endpoint is implemented with region allocation for port_lua e.g.