From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [tarantool-patches] [PATCH v3 2/6] box: rework box_lua_{call, eval} to use input port References: <20190619182820.GD6260@atlas> From: Kirill Shcherbatov Message-ID: Date: Thu, 20 Jun 2019 10:53:30 +0300 MIME-Version: 1.0 In-Reply-To: <20190619182820.GD6260@atlas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit To: Konstantin Osipov , tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com List-ID: > What is is_flat? > > Please why do you have to ask for an explanation, shouldn't you > update the declaration comment with an explanation? > > You also don't mention is_flat in the CS comment. .... > The comment is bare. In fact it's infuriatingly trivial. Please > explain why and how. Hi, you are right, this really was a flaw of previous version. But Vova already pointed to it and it is already fixed. /** * 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. */ 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. **/ const char *(*get_msgpack)(struct port *port, uint32_t *size);