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 5B441442BB6 for ; Sun, 12 Apr 2020 03:16:19 +0300 (MSK) Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1jNQIM-0005lJ-Rk for tarantool-patches@dev.tarantool.org; Sun, 12 Apr 2020 03:16:19 +0300 From: Vladislav Shpilevoy Date: Sun, 12 Apr 2020 02:13:27 +0200 Message-Id: <43a71d5de59d4c2cf2c7f1f9e42b8ba7f230143c.1586650013.git.v.shpilevoy@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 05/43] build: export src/lua/socket.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/socket.lua via FFI. Part of #2971 --- extra/exports | 2 -- src/exports.c | 2 ++ src/lua/init.c | 16 ++++++++++++++++ src/lua/socket.c | 10 ++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/extra/exports b/extra/exports index d81b4c05c..f034d3db1 100644 --- a/extra/exports +++ b/extra/exports @@ -2,8 +2,6 @@ # FFI -lbox_socket_local_resolve -lbox_socket_nonblock base64_decode base64_encode base64_bufsize diff --git a/src/exports.c b/src/exports.c index 2638bcd47..fb8de55da 100644 --- a/src/exports.c +++ b/src/exports.c @@ -50,6 +50,7 @@ EXPORT(clock_export_syms); EXPORT(scramble_export_syms); +EXPORT(tarantool_lua_export_syms); void export_syms(void) @@ -57,6 +58,7 @@ export_syms(void) void *syms[] = { clock_export_syms, scramble_export_syms, + tarantool_lua_export_syms, }; const int func_count = sizeof(syms) / sizeof(syms[0]); for (int i = 0; i < func_count; ++i) diff --git a/src/lua/init.c b/src/lua/init.c index 28b6b2d62..823117d94 100644 --- a/src/lua/init.c +++ b/src/lua/init.c @@ -730,3 +730,19 @@ tarantool_lua_free() } #endif } + +void ** +tarantool_lua_socket_export_syms(void); + +/** + * Aggregator of all symbols defined in src/lua. + */ +void ** +tarantool_lua_export_syms(void) +{ + static void *syms[] = { + /* Submodules. */ + (void *)tarantool_lua_socket_export_syms, + }; + return syms; +} diff --git a/src/lua/socket.c b/src/lua/socket.c index e75a8802e..8225ad32a 100644 --- a/src/lua/socket.c +++ b/src/lua/socket.c @@ -1105,3 +1105,13 @@ tarantool_lua_socket_init(struct lua_State *L) lua_pop(L, 1); /* socket.internal */ } + +void ** +tarantool_lua_socket_export_syms(void) +{ + static void *syms[] = { + (void *)lbox_socket_local_resolve, + (void *)lbox_socket_nonblock, + }; + return syms; +} -- 2.21.1 (Apple Git-122.3)