From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 41050442BB1 for ; Sun, 12 Apr 2020 03:15:22 +0300 (MSK) Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1jNQHR-0005lJ-Pg for tarantool-patches@dev.tarantool.org; Sun, 12 Apr 2020 03:15:22 +0300 From: Vladislav Shpilevoy Date: Sun, 12 Apr 2020 02:13:22 +0200 Message-Id: <79b489a63a21a04bd2c288ebab53ac37a2d3ba59.1586650013.git.v.shpilevoy@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 04/43] build: export src/scramble.c symbols List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org 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)