[Tarantool-patches] [PATCH 22/43] build: export src/lua/msgpack.c symbols
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun Apr 12 03:13:03 MSK 2020
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 <fiber.h>
@@ -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)
More information about the Tarantool-patches
mailing list