[Tarantool-patches] [PATCH 04/43] build: export src/scramble.c symbols

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Apr 12 03:13:22 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/scramble.c | 9 +++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/extra/exports b/extra/exports
index 6e6b5afd9..d81b4c05c 100644
--- a/extra/exports
+++ b/extra/exports
@@ -2,7 +2,6 @@
 
 # FFI
 
-password_prepare
 lbox_socket_local_resolve
 lbox_socket_nonblock
 base64_decode
diff --git a/src/exports.c b/src/exports.c
index 378ebfb42..2638bcd47 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -49,12 +49,14 @@
  */
 
 EXPORT(clock_export_syms);
+EXPORT(scramble_export_syms);
 
 void
 export_syms(void)
 {
 	void *syms[] = {
 		clock_export_syms,
+		scramble_export_syms,
 	};
 	const int func_count = sizeof(syms) / sizeof(syms[0]);
 	for (int i = 0; i < func_count; ++i)
diff --git a/src/scramble.c b/src/scramble.c
index b7a586eeb..7f962e387 100644
--- a/src/scramble.c
+++ b/src/scramble.c
@@ -129,3 +129,12 @@ password_prepare(const char *password, int len, char *out, int out_len)
 
 	base64_encode((char *) hash2, SCRAMBLE_SIZE, out, out_len, 0);
 }
+
+void **
+scramble_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)password_prepare,
+	};
+	return syms;
+}
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list