[Tarantool-patches] [PATCH 39/43] build: export src/box/error.cc symbols

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


Exports functions visible to the public C API.

Part of #2971
---
 extra/exports    |  6 ------
 src/box/error.cc | 14 ++++++++++++++
 src/exports.c    |  2 ++
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/extra/exports b/extra/exports
index 81c92f503..1503c989a 100644
--- a/extra/exports
+++ b/extra/exports
@@ -2,12 +2,6 @@
 
 # Module API
 
-box_error_type
-box_error_code
-box_error_message
-box_error_last
-box_error_clear
-box_error_set
 error_set_prev
 box_latch_new
 box_latch_delete
diff --git a/src/box/error.cc b/src/box/error.cc
index 233b312a2..3061b4df6 100644
--- a/src/box/error.cc
+++ b/src/box/error.cc
@@ -290,3 +290,17 @@ BuildAccessDeniedError(const char *file, unsigned int line,
 		return e;
 	}
 }
+
+extern "C" void **
+box_error_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)box_error_clear,
+		(void *)box_error_code,
+		(void *)box_error_last,
+		(void *)box_error_message,
+		(void *)box_error_set,
+		(void *)box_error_type,
+	};
+	return syms;
+}
diff --git a/src/exports.c b/src/exports.c
index 109398bf1..1794471c8 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -49,6 +49,7 @@
  */
 
 EXPORT(base64_export_syms);
+EXPORT(box_error_export_syms);
 EXPORT(box_export_syms);
 EXPORT(box_index_export_syms);
 EXPORT(box_key_def_export_syms);
@@ -83,6 +84,7 @@ export_syms(void)
 {
 	void *syms[] = {
 		base64_export_syms,
+		box_error_export_syms,
 		box_export_syms,
 		box_index_export_syms,
 		box_key_def_export_syms,
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list