[Tarantool-patches] [PATCH 14/43] build: export src/title.c symbols

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


Exports functions used by src/lua/title.lua via FFI.

Part of #2971
---
 extra/exports | 10 ----------
 src/exports.c |  2 ++
 src/title.c   | 18 ++++++++++++++++++
 3 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/extra/exports b/extra/exports
index 5e59efa75..cbf3906c9 100644
--- a/extra/exports
+++ b/extra/exports
@@ -6,16 +6,6 @@ ibuf_create
 ibuf_reinit
 ibuf_destroy
 ibuf_reserve_slow
-title_update
-title_get
-title_set_interpretor_name
-title_get_interpretor_name
-title_set_script_name
-title_get_script_name
-title_set_custom
-title_get_custom
-title_set_status
-title_get_status
 tnt_iconv_open
 tnt_iconv_close
 tnt_iconv
diff --git a/src/exports.c b/src/exports.c
index fcc1c7842..2d16c175b 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -57,6 +57,7 @@ EXPORT(random_export_syms);
 EXPORT(salad_guava_export_syms);
 EXPORT(scramble_export_syms);
 EXPORT(tarantool_lua_export_syms);
+EXPORT(title_export_syms);
 
 void
 export_syms(void)
@@ -71,6 +72,7 @@ export_syms(void)
 		salad_guava_export_syms,
 		scramble_export_syms,
 		tarantool_lua_export_syms,
+		title_export_syms,
 	};
 	const int func_count = sizeof(syms) / sizeof(syms[0]);
 	for (int i = 0; i < func_count; ++i)
diff --git a/src/title.c b/src/title.c
index e07ced779..fbdd6606f 100644
--- a/src/title.c
+++ b/src/title.c
@@ -197,3 +197,21 @@ DEFINE_STRING_ACCESSORS(interpretor_name)
 DEFINE_STRING_ACCESSORS(script_name)
 DEFINE_STRING_ACCESSORS(custom)
 DEFINE_STRING_ACCESSORS(status)
+
+void **
+title_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)title_get,
+		(void *)title_get_custom,
+		(void *)title_get_interpretor_name,
+		(void *)title_get_script_name,
+		(void *)title_get_status,
+		(void *)title_set_custom,
+		(void *)title_set_interpretor_name,
+		(void *)title_set_script_name,
+		(void *)title_set_status,
+		(void *)title_update,
+	};
+	return syms;
+}
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list