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 DB21A45C317 for ; Sun, 12 Apr 2020 03:13:54 +0300 (MSK) Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1jNQG2-0005lJ-D2 for tarantool-patches@dev.tarantool.org; Sun, 12 Apr 2020 03:13:54 +0300 From: Vladislav Shpilevoy Date: Sun, 12 Apr 2020 02:13:03 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 22/43] build: export src/lua/msgpack.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/msgpackffi.lua via FFI. Part of #2971 --- extra/exports | 9 --------- src/lua/init.c | 4 ++++ src/lua/msgpack.c | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/extra/exports b/extra/exports index edcc831b9..0f068ceac 100644 --- a/extra/exports +++ b/extra/exports @@ -7,15 +7,6 @@ ibuf_reinit ibuf_destroy ibuf_reserve_slow -mp_encode_double -mp_encode_float -mp_encode_decimal -mp_decode_double -mp_decode_float -mp_decode_extl -mp_sizeof_decimal -decimal_unpack - tarantool_uptime tarantool_exit space_by_id diff --git a/src/lua/init.c b/src/lua/init.c index a004b1342..2a09b1355 100644 --- a/src/lua/init.c +++ b/src/lua/init.c @@ -734,6 +734,9 @@ tarantool_lua_free() void ** tarantool_lua_digest_export_syms(void); +void ** +tarantool_lua_msgpack_export_syms(void); + void ** tarantool_lua_socket_export_syms(void); @@ -749,6 +752,7 @@ tarantool_lua_export_syms(void) static void *syms[] = { /* Submodules. */ (void *)tarantool_lua_digest_export_syms, + (void *)tarantool_lua_msgpack_export_syms, (void *)tarantool_lua_socket_export_syms, (void *)tarantool_lua_tnt_iconv_export_syms, diff --git a/src/lua/msgpack.c b/src/lua/msgpack.c index edbc15b72..b8a853252 100644 --- a/src/lua/msgpack.c +++ b/src/lua/msgpack.c @@ -43,6 +43,7 @@ #include "lua/decimal.h" /* lua_pushdecimal() */ #include "lib/core/decimal.h" /* decimal_unpack() */ +#include "mp_decimal.h" #include "lib/core/mp_extension_types.h" #include @@ -573,3 +574,19 @@ luaopen_msgpack(lua_State *L) luaL_msgpack_default = luaL_newserializer(L, "msgpack", msgpacklib); return 1; } + +void ** +tarantool_lua_msgpack_export_syms(void) +{ + static void *syms[] = { + (void *)decimal_unpack, + (void *)mp_encode_double, + (void *)mp_encode_float, + (void *)mp_encode_decimal, + (void *)mp_decode_double, + (void *)mp_decode_float, + (void *)mp_decode_extl, + (void *)mp_sizeof_decimal, + }; + return syms; +} -- 2.21.1 (Apple Git-122.3)