From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [217.69.128.34]) (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 1160F44643B for ; Thu, 24 Sep 2020 20:01:01 +0300 (MSK) From: Timur Safin Date: Thu, 24 Sep 2020 20:00:16 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2.X 3/7] module api: luaT_newthread List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: v.shpilevoy@tarantool.org, alexander.turenko@tarantool.org Cc: tarantool-patches@dev.tarantool.org Exporting `luaT_newthread` as it's necessary for external merger Part of #5273 --- src/exports.h | 1 + src/lua/utils.h | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/exports.h b/src/exports.h index 202f5bf19..20070b240 100644 --- a/src/exports.h +++ b/src/exports.h @@ -412,6 +412,7 @@ EXPORT(luaT_checktuple) EXPORT(luaT_cpcall) EXPORT(luaT_error) EXPORT(luaT_istuple) +EXPORT(luaT_newthread) EXPORT(luaT_pushtuple) EXPORT(luaT_state) EXPORT(luaT_tolstring) diff --git a/src/lua/utils.h b/src/lua/utils.h index e9dd27d08..7639cd64a 100644 --- a/src/lua/utils.h +++ b/src/lua/utils.h @@ -539,6 +539,19 @@ luaT_tolstring(lua_State *L, int idx, size_t *ssize); LUA_API int luaL_iscallable(lua_State *L, int idx); + +/** + * @brief Creates a new Lua coroutine in a protected frame. If + * call underneath succeeds, the created Lua state + * is on the top of the guest stack and a pointer to this state is + * returned. Otherwise LUA_ERRMEM error is handled and the result + * is NULL. + * @param L is a Lua state + * @sa + */ +struct lua_State * +luaT_newthread(struct lua_State *L); + /** \endcond public */ /** @@ -616,18 +629,6 @@ luaL_checkfinite(struct lua_State *L, struct luaL_serializer *cfg, luaL_error(L, "number must not be NaN or Inf"); } -/** - * @brief Creates a new Lua coroutine in a protected frame. If - * call underneath succeeds, the created Lua state - * is on the top of the guest stack and a pointer to this state is - * returned. Otherwise LUA_ERRMEM error is handled and the result - * is NULL. - * @param L is a Lua state - * @sa - */ -struct lua_State * -luaT_newthread(struct lua_State *L); - /** * Check if a value on @a L stack by index @a idx is an ibuf * object. Both 'struct ibuf' and 'struct ibuf *' are accepted. -- 2.20.1