From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 B63FB446420 for ; Sun, 12 Apr 2020 03:14:07 +0300 (MSK) Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1jNQGF-0005lJ-Ag for tarantool-patches@dev.tarantool.org; Sun, 12 Apr 2020 03:14:07 +0300 From: Vladislav Shpilevoy Date: Sun, 12 Apr 2020 02:13:08 +0200 Message-Id: <2b4cd4b8a2cf9e7799a1163bd5a2a6f0bc3ca7fb.1586650014.git.v.shpilevoy@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 27/43] build: export src/lua/buffer.c symbols List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org Exports functions used by src/lua/buffer.lua via FFI. Part of #2971 --- extra/exports | 7 ------- src/lua/buffer.c | 14 ++++++++++++++ src/lua/init.c | 4 ++++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/extra/exports b/extra/exports index cc7aa4f11..2d1d9f05e 100644 --- a/extra/exports +++ b/extra/exports @@ -2,13 +2,6 @@ # FFI -ibuf_create -ibuf_reinit -ibuf_destroy -ibuf_reserve_slow - -lua_static_aligned_alloc - swim_is_configured swim_cfg swim_set_payload diff --git a/src/lua/buffer.c b/src/lua/buffer.c index 5fd349261..0eb771e51 100644 --- a/src/lua/buffer.c +++ b/src/lua/buffer.c @@ -29,6 +29,7 @@ * SUCH DAMAGE. */ #include "small/static.h" +#include "small/ibuf.h" /** * Static inline functions like in static.h can't be exported. @@ -40,3 +41,16 @@ lua_static_aligned_alloc(size_t size, size_t alignment) { return static_aligned_alloc(size, alignment); } + +void ** +tarantool_lua_buffer_export_syms(void) +{ + static void *syms[] = { + (void *)ibuf_create, + (void *)ibuf_reinit, + (void *)ibuf_destroy, + (void *)ibuf_reserve_slow, + (void *)lua_static_aligned_alloc, + }; + return syms; +} diff --git a/src/lua/init.c b/src/lua/init.c index 2a09b1355..65c1a04ec 100644 --- a/src/lua/init.c +++ b/src/lua/init.c @@ -731,6 +731,9 @@ tarantool_lua_free() #endif } +void ** +tarantool_lua_buffer_export_syms(void); + void ** tarantool_lua_digest_export_syms(void); @@ -751,6 +754,7 @@ tarantool_lua_export_syms(void) { static void *syms[] = { /* Submodules. */ + (void *)tarantool_lua_buffer_export_syms, (void *)tarantool_lua_digest_export_syms, (void *)tarantool_lua_msgpack_export_syms, (void *)tarantool_lua_socket_export_syms, -- 2.21.1 (Apple Git-122.3)