[Tarantool-patches] [PATCH 06/43] build: export third_party/base64.c symbols
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun Apr 12 03:13:28 MSK 2020
Exports functions used by src/lua/digest.lua via FFI.
Part of #2971
---
extra/exports | 3 ---
src/exports.c | 2 ++
third_party/base64.c | 11 +++++++++++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/extra/exports b/extra/exports
index f034d3db1..3ef90a414 100644
--- a/extra/exports
+++ b/extra/exports
@@ -2,9 +2,6 @@
# FFI
-base64_decode
-base64_encode
-base64_bufsize
SHA1internal
guava
random_bytes
diff --git a/src/exports.c b/src/exports.c
index fb8de55da..4c06320c7 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -48,6 +48,7 @@
* Add new exporters here. Keep them in alphabetical order.
*/
+EXPORT(base64_export_syms);
EXPORT(clock_export_syms);
EXPORT(scramble_export_syms);
EXPORT(tarantool_lua_export_syms);
@@ -56,6 +57,7 @@ void
export_syms(void)
{
void *syms[] = {
+ base64_export_syms,
clock_export_syms,
scramble_export_syms,
tarantool_lua_export_syms,
diff --git a/third_party/base64.c b/third_party/base64.c
index 8ecab23eb..cb12f9c79 100644
--- a/third_party/base64.c
+++ b/third_party/base64.c
@@ -321,3 +321,14 @@ base64_decode(const char *in_base64, int in_len,
}
/* }}} */
+
+void **
+base64_export_syms(void)
+{
+ static void *syms[] = {
+ (void *)base64_bufsize,
+ (void *)base64_decode,
+ (void *)base64_encode,
+ };
+ return syms;
+}
--
2.21.1 (Apple Git-122.3)
More information about the Tarantool-patches
mailing list