[Tarantool-patches] [PATCH 28/43] build: export src/lib/swim/swim.c symbols
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun Apr 12 03:13:09 MSK 2020
Exports functions used by src/lua/swim.lua via FFI.
Part of #2971
---
extra/exports | 27 ---------------------------
src/exports.c | 2 ++
src/lib/swim/swim.c | 32 ++++++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 27 deletions(-)
diff --git a/extra/exports b/extra/exports
index 2d1d9f05e..71dc6c3b7 100644
--- a/extra/exports
+++ b/extra/exports
@@ -1,32 +1,5 @@
# Symbols exported by the main Tarantool executable
-# FFI
-
-swim_is_configured
-swim_cfg
-swim_set_payload
-swim_set_codec
-swim_add_member
-swim_remove_member
-swim_probe_member
-swim_broadcast
-swim_size
-swim_quit
-swim_self
-swim_member_by_uuid
-swim_member_status
-swim_iterator_open
-swim_iterator_next
-swim_iterator_close
-swim_member_uri
-swim_member_uuid
-swim_member_incarnation
-swim_member_payload
-swim_member_ref
-swim_member_unref
-swim_member_is_dropped
-swim_member_is_payload_up_to_date
-
# Module API
fiber_cond_new
diff --git a/src/exports.c b/src/exports.c
index db77955ed..388f21341 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -64,6 +64,7 @@ EXPORT(random_export_syms);
EXPORT(salad_guava_export_syms);
EXPORT(say_export_syms);
EXPORT(scramble_export_syms);
+EXPORT(swim_export_syms);
EXPORT(tarantool_lua_export_syms);
EXPORT(title_export_syms);
EXPORT(tt_uuid_export_syms);
@@ -89,6 +90,7 @@ export_syms(void)
salad_guava_export_syms,
say_export_syms,
scramble_export_syms,
+ swim_export_syms,
tarantool_lua_export_syms,
title_export_syms,
tt_uuid_export_syms,
diff --git a/src/lib/swim/swim.c b/src/lib/swim/swim.c
index 9a7b4ce85..21f241e81 100644
--- a/src/lib/swim/swim.c
+++ b/src/lib/swim/swim.c
@@ -2421,3 +2421,35 @@ swim_member_is_payload_up_to_date(const struct swim_member *member)
{
return member->is_payload_up_to_date;
}
+
+void **
+swim_export_syms(void)
+{
+ static void *syms[] = {
+ (void *)swim_add_member,
+ (void *)swim_broadcast,
+ (void *)swim_cfg,
+ (void *)swim_is_configured,
+ (void *)swim_iterator_close,
+ (void *)swim_iterator_next,
+ (void *)swim_iterator_open,
+ (void *)swim_member_by_uuid,
+ (void *)swim_member_incarnation,
+ (void *)swim_member_is_dropped,
+ (void *)swim_member_is_payload_up_to_date,
+ (void *)swim_member_payload,
+ (void *)swim_member_ref,
+ (void *)swim_member_status,
+ (void *)swim_member_unref,
+ (void *)swim_member_uri,
+ (void *)swim_member_uuid,
+ (void *)swim_probe_member,
+ (void *)swim_quit,
+ (void *)swim_remove_member,
+ (void *)swim_self,
+ (void *)swim_set_codec,
+ (void *)swim_set_payload,
+ (void *)swim_size,
+ };
+ return syms;
+}
--
2.21.1 (Apple Git-122.3)
More information about the Tarantool-patches
mailing list