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

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


Exports a function used by src/box/lua/schema.lua via FFI.

Part of #2971
---
 extra/exports       | 1 -
 src/exports.c       | 2 ++
 src/lib/core/port.c | 9 +++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/extra/exports b/extra/exports
index 09bbd6f33..1d5cd1be6 100644
--- a/extra/exports
+++ b/extra/exports
@@ -6,7 +6,6 @@ ibuf_create
 ibuf_reinit
 ibuf_destroy
 ibuf_reserve_slow
-port_destroy
 csv_create
 csv_destroy
 csv_setopt
diff --git a/src/exports.c b/src/exports.c
index 4e39528ed..d7e8aa3f7 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -51,6 +51,7 @@
 EXPORT(base64_export_syms);
 EXPORT(clock_export_syms);
 EXPORT(fiber_export_syms);
+EXPORT(port_export_syms);
 EXPORT(random_export_syms);
 EXPORT(salad_guava_export_syms);
 EXPORT(scramble_export_syms);
@@ -63,6 +64,7 @@ export_syms(void)
 		base64_export_syms,
 		clock_export_syms,
 		fiber_export_syms,
+		port_export_syms,
 		random_export_syms,
 		salad_guava_export_syms,
 		scramble_export_syms,
diff --git a/src/lib/core/port.c b/src/lib/core/port.c
index 03694b466..b27c8df05 100644
--- a/src/lib/core/port.c
+++ b/src/lib/core/port.c
@@ -35,3 +35,12 @@ port_destroy(struct port *port)
 {
 	port->vtab->destroy(port);
 }
+
+void **
+port_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)port_destroy,
+	};
+	return syms;
+}
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list