[Tarantool-patches] [PATCH 07/43] build: export src/lua/digest.c symbols

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Apr 12 03:13:29 MSK 2020


Exports a function used by src/lua/digest.lua via FFI.

Part of #2971
---
 extra/exports    | 1 -
 src/lua/digest.c | 9 +++++++++
 src/lua/init.c   | 4 ++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/extra/exports b/extra/exports
index 3ef90a414..cb0b823bb 100644
--- a/extra/exports
+++ b/extra/exports
@@ -2,7 +2,6 @@
 
 # FFI
 
-SHA1internal
 guava
 random_bytes
 fiber_time
diff --git a/src/lua/digest.c b/src/lua/digest.c
index b0572baf7..c1b1a92c7 100644
--- a/src/lua/digest.c
+++ b/src/lua/digest.c
@@ -100,3 +100,12 @@ tarantool_lua_digest_init(struct lua_State *L)
 	luaL_register_module(L, "digest", lua_digest_methods);
 	lua_pop(L, 1);
 };
+
+void **
+tarantool_lua_digest_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)SHA1internal,
+	};
+	return syms;
+}
diff --git a/src/lua/init.c b/src/lua/init.c
index 823117d94..da1a19ccd 100644
--- a/src/lua/init.c
+++ b/src/lua/init.c
@@ -731,6 +731,9 @@ tarantool_lua_free()
 #endif
 }
 
+void **
+tarantool_lua_digest_export_syms(void);
+
 void **
 tarantool_lua_socket_export_syms(void);
 
@@ -742,6 +745,7 @@ tarantool_lua_export_syms(void)
 {
 	static void *syms[] = {
 		/* Submodules. */
+		(void *)tarantool_lua_digest_export_syms,
 		(void *)tarantool_lua_socket_export_syms,
 	};
 	return syms;
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list