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

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


Exports functions used by src/box/lua/schema.lua via FFI.

Part of #2971
---
 extra/exports     | 3 ---
 src/box/schema.cc | 9 +++++++++
 src/exports.c     | 2 ++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/extra/exports b/extra/exports
index 07788465f..111dad57e 100644
--- a/extra/exports
+++ b/extra/exports
@@ -7,9 +7,6 @@ ibuf_reinit
 ibuf_destroy
 ibuf_reserve_slow
 
-space_by_id
-box_schema_version
-
 crypto_EVP_MD_CTX_new
 crypto_EVP_MD_CTX_free
 crypto_HMAC_CTX_new
diff --git a/src/box/schema.cc b/src/box/schema.cc
index 456eef429..0a04b3d56 100644
--- a/src/box/schema.cc
+++ b/src/box/schema.cc
@@ -718,3 +718,12 @@ schema_find_name(enum schema_object_type type, uint32_t object_id)
 	return "(nil)";
 }
 
+extern "C" void **
+box_schema_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)box_schema_version,
+		(void *)space_by_id,
+	};
+	return syms;
+}
diff --git a/src/exports.c b/src/exports.c
index 24745e16e..a939954c7 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -49,6 +49,7 @@
  */
 
 EXPORT(base64_export_syms);
+EXPORT(box_schema_export_syms);
 EXPORT(box_space_export_syms);
 EXPORT(clock_export_syms);
 EXPORT(crc32_export_syms);
@@ -72,6 +73,7 @@ export_syms(void)
 {
 	void *syms[] = {
 		base64_export_syms,
+		box_schema_export_syms,
 		box_space_export_syms,
 		clock_export_syms,
 		crc32_export_syms,
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list