From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CA8334696CC for ; Sun, 12 Apr 2020 03:13:45 +0300 (MSK) Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1jNQFt-0005lJ-A9 for tarantool-patches@dev.tarantool.org; Sun, 12 Apr 2020 03:13:45 +0300 From: Vladislav Shpilevoy Date: Sun, 12 Apr 2020 02:12:58 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 18/43] build: export src/lib/core/say.c symbols List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org 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)