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

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


Exports a function used by src/lua/error.lua via FFI.

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

diff --git a/extra/exports b/extra/exports
index 1503c989a..809e0e07f 100644
--- a/extra/exports
+++ b/extra/exports
@@ -2,7 +2,6 @@
 
 # Module API
 
-error_set_prev
 box_latch_new
 box_latch_delete
 box_latch_lock
diff --git a/src/exports.c b/src/exports.c
index 1794471c8..a62c89b14 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -63,6 +63,7 @@ EXPORT(coio_export_syms);
 EXPORT(crc32_export_syms);
 EXPORT(crypto_export_syms);
 EXPORT(csv_export_syms);
+EXPORT(diag_export_syms);
 EXPORT(exception_export_syms);
 EXPORT(fiber_cond_export_syms);
 EXPORT(fiber_export_syms);
@@ -98,6 +99,7 @@ export_syms(void)
 		crc32_export_syms,
 		crypto_export_syms,
 		csv_export_syms,
+		diag_export_syms,
 		exception_export_syms,
 		fiber_cond_export_syms,
 		fiber_export_syms,
diff --git a/src/lib/core/diag.c b/src/lib/core/diag.c
index e143db18d..8b2db8c02 100644
--- a/src/lib/core/diag.c
+++ b/src/lib/core/diag.c
@@ -120,3 +120,11 @@ error_vformat_msg(struct error *e, const char *format, va_list ap)
 	vsnprintf(e->errmsg, sizeof(e->errmsg), format, ap);
 }
 
+void **
+diag_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)error_set_prev,
+	};
+	return syms;
+}
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list