From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org,
Konstantin Osipov <kostja@tarantool.org>
Cc: vdavydov.dev@gmail.com
Subject: Re: [tarantool-patches] Re: [PATCH v3 2/6] box: rework box_lua_{call, eval} to use input port
Date: Thu, 20 Jun 2019 11:44:43 +0300 [thread overview]
Message-ID: <a87d6a5d-d82b-e404-50ef-2e3124e9f948@tarantool.org> (raw)
In-Reply-To: <20190620080945.GJ15155@atlas>
On 20.06.2019 11:09, Konstantin Osipov wrote:
> * Kirill Shcherbatov <kshcherbatov@tarantool.org> [19/06/20 10:54]:
>> /**
>> * Dump the content of a port to a given Lua stack.
>> * When is_flat == true is specified, the data is dumped
>> * directly to Lua stack, item-by-item. Otherwise, a
>> * result table is created.
>> */
>
> Still I miss why we need this mode from this comment. Is this for
> 1.6 compatibility? I would ditch it in this case, we are not
> obliged to support 1.6 in 2.3.
/**
* Dump the content of a port to a given Lua stack.
* When is_flat == true is specified, the data is dumped
* directly to Lua stack, item-by-item. Otherwise, a
* result table is created. The is_flat == true mode
* follows Lua functions convention to pass arguments
* and return a results, while is_flat == false follows
* Tarantool's :select convention when the table of
* results is returned.
*/
void (*dump_lua)(struct port *port, struct lua_State *L, bool is_flat);
>
>> void (*dump_lua)(struct port *port, struct lua_State *L, bool is_flat);
>>
>> /**
>> * Get the content of a port as a msgpack data.
>> * The lifecycle of the returned value is
>> * implementation-specific: it may either be returned
>> * directly from the port, in which case the data will
>> * stay alive as long as the port is alive, or it may be
>> * allocated on the fiber()->gc, in which case the caller
>> * is responsible for cleaning up.
>> **/
>
> Once again, please also explain how it is going tobe used - by an
> obsolete convention, C stored routines expect msgpack data as
> input format for its arguments.
>
>> const char *(*get_msgpack)(struct port *port, uint32_t *size);
/**
* Get the content of a port as a msgpack data.
* By an obsolete convention, C stored routines expect
* msgpack data as input format for its arguments.
* This API is also usefull to process a function
* returned value as msgpack data in memory.
* The lifecycle of the returned value is
* implementation-specific: it may either be returned
* directly from the port, in which case the data will
* stay alive as long as the port is alive, or it may be
* allocated on the fiber()->gc, in which case the caller
* is responsible for cleaning up.
**/
const char *(*get_msgpack)(struct port *port, uint32_t *size);
next prev parent reply other threads:[~2019-06-20 8:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 14:08 [PATCH v3 0/6] box: rework functions machinery Kirill Shcherbatov
2019-06-13 14:08 ` [PATCH v3 1/6] box: rework func cache update machinery Kirill Shcherbatov
2019-06-18 10:52 ` Vladimir Davydov
2019-06-19 15:51 ` [tarantool-patches] " Kirill Shcherbatov
2019-06-13 14:08 ` [PATCH v3 2/6] box: rework box_lua_{call, eval} to use input port Kirill Shcherbatov
2019-06-17 9:35 ` [tarantool-patches] " Konstantin Osipov
2019-06-17 10:27 ` [tarantool-patches] " Kirill Shcherbatov
2019-06-18 12:12 ` Vladimir Davydov
2019-06-19 15:51 ` [tarantool-patches] " Kirill Shcherbatov
2019-06-19 16:11 ` Vladimir Davydov
2019-06-18 13:58 ` Vladimir Davydov
2019-06-19 18:28 ` [tarantool-patches] " Konstantin Osipov
2019-06-20 7:53 ` Kirill Shcherbatov
2019-06-20 8:09 ` Konstantin Osipov
2019-06-20 8:44 ` Kirill Shcherbatov [this message]
2019-06-19 18:30 ` Konstantin Osipov
2019-06-13 14:08 ` [PATCH v3 3/6] box: rework func object as a function frontend Kirill Shcherbatov
2019-06-18 13:23 ` Vladimir Davydov
2019-06-19 15:51 ` [tarantool-patches] " Kirill Shcherbatov
2019-06-13 14:08 ` [PATCH v3 4/6] box: export registered functions in box.func folder Kirill Shcherbatov
2019-06-18 14:06 ` Vladimir Davydov
2019-06-19 15:51 ` [tarantool-patches] " Kirill Shcherbatov
2019-06-18 16:11 ` Vladimir Davydov
2019-06-13 14:08 ` [PATCH v3 5/6] box: refactor box_lua_find helper Kirill Shcherbatov
2019-06-18 14:22 ` Vladimir Davydov
2019-06-19 15:51 ` [tarantool-patches] " Kirill Shcherbatov
2019-06-13 14:08 ` [PATCH v3 6/6] box: introduce Lua persistent functions Kirill Shcherbatov
2019-06-18 16:23 ` Vladimir Davydov
2019-06-19 15:51 ` [tarantool-patches] " Kirill Shcherbatov
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=a87d6a5d-d82b-e404-50ef-2e3124e9f948@tarantool.org \
--to=kshcherbatov@tarantool.org \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] Re: [PATCH v3 2/6] box: rework box_lua_{call, eval} to use input port' \
/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