From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp10.mail.ru (smtp10.mail.ru [94.100.181.92]) (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 DA470469719 for ; Fri, 9 Oct 2020 00:46:11 +0300 (MSK) Date: Fri, 9 Oct 2020 00:46:28 +0300 From: Alexander Turenko Message-ID: <20201008214628.k624ylfes33z7j5m@tkn_work_nb> References: <98551e8b90ebd2839dee57fee13f446aee515e42.1600817803.git.alexander.turenko@tarantool.org> <53bcd1f3-7a8d-dc4e-93de-11445a64e815@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <53bcd1f3-7a8d-dc4e-93de-11445a64e815@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 03/14] WIP: module api/lua: add luaL_iscdata() function List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org > > diff --git a/src/exports.h b/src/exports.h > > index 7861bb529..08ca03507 100644 > > --- a/src/exports.h > > +++ b/src/exports.h > > @@ -355,6 +355,7 @@ EXPORT(luaL_fileresult) > > EXPORT(luaL_findtable) > > EXPORT(luaL_getmetafield) > > EXPORT(luaL_gsub) > > +EXPORT(luaL_iscdata) > > EXPORT(luaL_iscallable) > > 1. 'd' > 'a', so luaL_isc*d*ata should come after luaL_isc*a*llable. You're machine! Sure, will fix in the next patchset version. > > > EXPORT(luaL_loadbuffer) > > EXPORT(luaL_loadbufferx) > > diff --git a/src/lua/utils.h b/src/lua/utils.h > > index 7e02a05f2..e9dd27d08 100644 > > --- a/src/lua/utils.h > > +++ b/src/lua/utils.h > > @@ -78,6 +78,26 @@ luaL_pushuuid(struct lua_State *L); > > > > /** \cond public */ > > > > +/** > > + * @brief Checks whether a value on the Lua stack is a cdata. > > + * > > + * Unlike () this function does not raise an > > + * error. It is useful to raise a domain specific error. > > + * > > + * Lua API and module API don't expose LUA_TCDATA constant. > > + * We have no guarantee that this constant will remain the same in > > + * future LuaJIT versions. So this function should be used in > > + * modules instead of `lua_type(L, idx) == LUA_TCDATA`. > > + * > > + * @param L Lua State > > + * @param idx stack index > > 2. I am going to go OCD here, but lets start sentences from a capital > letter and end with a dot. Here and in all the other commits in > their places. Okay.