From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 2722F44643A for ; Sun, 11 Oct 2020 18:25:29 +0300 (MSK) References: From: Vladislav Shpilevoy Message-ID: <9b2939cb-d2fe-e22d-41e4-0c653f04ddf7@tarantool.org> Date: Sun, 11 Oct 2020 17:25:27 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 07/15] module api/lua: expose luaT_tuple_new() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Thanks for the patch! See 1 comment below. > diff --git a/src/box/lua/tuple.h b/src/box/lua/tuple.h > index aadcf7f59..0c7e8a16f 100644 > --- a/src/box/lua/tuple.h > +++ b/src/box/lua/tuple.h > @@ -92,21 +92,35 @@ luaT_istuple(struct lua_State *L, int idx); > * should call () to release the data. > * > * In case of an error set a diag and return NULL. > + * > + * @sa luaT_tuple_new() > */ > API_EXPORT char * > luaT_tuple_encode(struct lua_State *L, int idx, size_t *tuple_len_ptr); > > -/** \endcond public */ > - > /** > * Create a new tuple with specific format from a Lua table or a > * tuple. > * > + * The new tuple is referenced in the same way as one created by > + * (). There are two possible usage scenarious: > + * > + * 1. A short living tuple may not be referenced explicitly and > + * will be collected automatically at the next module API call > + * that yields or returns a tuple. > + * 2. A long living tuple must be referenced using > + * () and unreferenced than with than -> then.