[Tarantool-patches] [PATCH 44/43] build: export src/box/lua/console.c symbols

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Apr 14 04:27:26 MSK 2020


Exports functions used by src/box/lua/console.lua via FFI.

Closes #2971
---

I rebased the patchset on the master and got a new commit,
since a couple of new functions were exported from the console
module.

 extra/exports         |  6 ------
 src/box/lua/console.c | 10 ++++++++++
 src/box/lua/init.c    |  4 ++++
 3 files changed, 14 insertions(+), 6 deletions(-)
 delete mode 100644 extra/exports

diff --git a/extra/exports b/extra/exports
deleted file mode 100644
index 41432a547..000000000
--- a/extra/exports
+++ /dev/null
@@ -1,6 +0,0 @@
-# Symbols exported by the main Tarantool executable
-
-# FFI
-
-console_get_output_format
-console_set_output_format
diff --git a/src/box/lua/console.c b/src/box/lua/console.c
index bd454c269..b2a6e87b7 100644
--- a/src/box/lua/console.c
+++ b/src/box/lua/console.c
@@ -803,3 +803,13 @@ error:
 	lua_settop(L, savetop);
 	return ml.list;
 }
+
+void **
+box_lua_console_export_syms(void)
+{
+	static void *syms[] = {
+		console_get_output_format,
+		console_set_output_format,
+	};
+	return syms;
+}
diff --git a/src/box/lua/init.c b/src/box/lua/init.c
index fb35ea56c..b565d6bc0 100644
--- a/src/box/lua/init.c
+++ b/src/box/lua/init.c
@@ -442,6 +442,9 @@ box_lua_init(struct lua_State *L)
 	assert(lua_gettop(L) == 0);
 }
 
+void **
+box_lua_console_export_syms(void);
+
 void **
 box_lua_tuple_export_syms(void);
 
@@ -449,6 +452,7 @@ void **
 box_lua_export_syms(void)
 {
 	static void *syms[] = {
+		(void *)box_lua_console_export_syms,
 		(void *)box_lua_tuple_export_syms,
 	};
 	return syms;
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list