[Tarantool-patches] [PATCH 18/43] build: export src/lib/core/say.c symbols

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


Exports functions and variables used by src/lua/log.lua via FFI,
and visible in the public C API.

Part of #2971
---
 extra/exports      |  8 --------
 src/exports.c      |  2 ++
 src/lib/core/say.c | 16 ++++++++++++++++
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/extra/exports b/extra/exports
index b81ca4492..c95ea2c80 100644
--- a/extra/exports
+++ b/extra/exports
@@ -7,8 +7,6 @@ ibuf_reinit
 ibuf_destroy
 ibuf_reserve_slow
 
-log_level
-log_format
 uri_parse
 uri_format
 PMurHash32
@@ -24,13 +22,8 @@ mp_decode_extl
 mp_sizeof_decimal
 decimal_unpack
 
-log_type
-say_set_log_level
-say_logrotate
-say_set_log_format
 tarantool_uptime
 tarantool_exit
-log_pid
 space_by_id
 space_run_triggers
 space_bsize
@@ -75,7 +68,6 @@ swim_member_is_payload_up_to_date
 
 # Module API
 
-_say
 fiber_cond_new
 fiber_cond_delete
 fiber_cond_signal
diff --git a/src/exports.c b/src/exports.c
index 37570d40e..e034c46aa 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -56,6 +56,7 @@ EXPORT(fiber_export_syms);
 EXPORT(port_export_syms);
 EXPORT(random_export_syms);
 EXPORT(salad_guava_export_syms);
+EXPORT(say_export_syms);
 EXPORT(scramble_export_syms);
 EXPORT(tarantool_lua_export_syms);
 EXPORT(title_export_syms);
@@ -73,6 +74,7 @@ export_syms(void)
 		port_export_syms,
 		random_export_syms,
 		salad_guava_export_syms,
+		say_export_syms,
 		scramble_export_syms,
 		tarantool_lua_export_syms,
 		title_export_syms,
diff --git a/src/lib/core/say.c b/src/lib/core/say.c
index 5d572e1ab..4eeaa3715 100644
--- a/src/lib/core/say.c
+++ b/src/lib/core/say.c
@@ -1243,3 +1243,19 @@ log_say(struct log *log, int level, const char *filename, int line,
 	va_end(ap);
 	return total;
 }
+
+void **
+say_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)&log_format,
+		(void *)&log_level,
+		(void *)&log_pid,
+		(void *)log_type,
+		(void *)say_logrotate,
+		(void *)say_set_log_format,
+		(void *)say_set_log_level,
+		(void *)&_say,
+	};
+	return syms;
+}
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list