[Tarantool-patches] [PATCH 13/43] build: export src/lib/csv/csv.c symbols

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


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

Part of #2971
---
 extra/exports     |  7 -------
 src/exports.c     |  2 ++
 src/lib/csv/csv.c | 15 +++++++++++++++
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/extra/exports b/extra/exports
index 1d5cd1be6..5e59efa75 100644
--- a/extra/exports
+++ b/extra/exports
@@ -6,13 +6,6 @@ ibuf_create
 ibuf_reinit
 ibuf_destroy
 ibuf_reserve_slow
-csv_create
-csv_destroy
-csv_setopt
-csv_iterator_create
-csv_next
-csv_feed
-csv_escape_field
 title_update
 title_get
 title_set_interpretor_name
diff --git a/src/exports.c b/src/exports.c
index d7e8aa3f7..fcc1c7842 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -50,6 +50,7 @@
 
 EXPORT(base64_export_syms);
 EXPORT(clock_export_syms);
+EXPORT(csv_export_syms);
 EXPORT(fiber_export_syms);
 EXPORT(port_export_syms);
 EXPORT(random_export_syms);
@@ -63,6 +64,7 @@ export_syms(void)
 	void *syms[] = {
 		base64_export_syms,
 		clock_export_syms,
+		csv_export_syms,
 		fiber_export_syms,
 		port_export_syms,
 		random_export_syms,
diff --git a/src/lib/csv/csv.c b/src/lib/csv/csv.c
index 0a2f7b4d0..648cccc55 100644
--- a/src/lib/csv/csv.c
+++ b/src/lib/csv/csv.c
@@ -409,3 +409,18 @@ csv_escape_field(struct csv *csv, const char *field,
 	*p = 0;
 	return p - dst;
 }
+
+void **
+csv_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)csv_create,
+		(void *)csv_destroy,
+		(void *)csv_escape_field,
+		(void *)csv_feed,
+		(void *)csv_iterator_create,
+		(void *)csv_next,
+		(void *)csv_setopt,
+	};
+	return syms;
+}
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list