From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH 38/43] build: export src/box/box.cc symbols
Date: Sun, 12 Apr 2020 02:13:20 +0200 [thread overview]
Message-ID: <22c6014165fd76c942f401990176d37e35b4f55c.1586650014.git.v.shpilevoy@tarantool.org> (raw)
In-Reply-To: <cover.1586650013.git.v.shpilevoy@tarantool.org>
Exports functions visible to the public C API and used by
src/box/lua/schema.lua via FFI.
It is worth mentioning why box_export_syms() does not aggregate
all the other box_*_export_syms(). This is because there is a
broken dependency between main.cc and 'box' static lib.
'box' uses functions 'tarantool_uptime()' and 'load_cfg()', which
are defined in main.cc. When box_export_syms() tries to aggregate
symbols from its submodules, this break explodes. And its fix is
not as a trival as it seems, so it is postponed.
Part of #2971
---
| 14 --------------
src/box/box.cc | 22 ++++++++++++++++++++++
src/exports.c | 2 ++
3 files changed, 24 insertions(+), 14 deletions(-)
--git a/extra/exports b/extra/exports
index 51420a322..81c92f503 100644
--- a/extra/exports
+++ b/extra/exports
@@ -2,20 +2,6 @@
# Module API
-box_return_tuple
-box_space_id_by_name
-box_index_id_by_name
-box_select
-box_insert
-box_replace
-box_delete
-box_update
-box_upsert
-box_truncate
-box_sequence_next
-box_sequence_current
-box_sequence_set
-box_sequence_reset
box_error_type
box_error_code
box_error_message
diff --git a/src/box/box.cc b/src/box/box.cc
index 0c15ba5e9..c8c78b3ce 100644
--- a/src/box/box.cc
+++ b/src/box/box.cc
@@ -2544,3 +2544,25 @@ box_reset_stat(void)
engine_reset_stat();
space_foreach(box_reset_space_stat, NULL);
}
+
+extern "C" void **
+box_export_syms(void)
+{
+ static void *syms[] = {
+ (void *)box_delete,
+ (void *)box_index_id_by_name,
+ (void *)box_insert,
+ (void *)box_replace,
+ (void *)box_return_tuple,
+ (void *)box_select,
+ (void *)box_sequence_current,
+ (void *)box_sequence_next,
+ (void *)box_sequence_reset,
+ (void *)box_sequence_set,
+ (void *)box_space_id_by_name,
+ (void *)box_truncate,
+ (void *)box_update,
+ (void *)box_upsert,
+ };
+ return syms;
+}
diff --git a/src/exports.c b/src/exports.c
index 7fc38f642..109398bf1 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -49,6 +49,7 @@
*/
EXPORT(base64_export_syms);
+EXPORT(box_export_syms);
EXPORT(box_index_export_syms);
EXPORT(box_key_def_export_syms);
EXPORT(box_lua_export_syms);
@@ -82,6 +83,7 @@ export_syms(void)
{
void *syms[] = {
base64_export_syms,
+ box_export_syms,
box_index_export_syms,
box_key_def_export_syms,
box_lua_export_syms,
--
2.21.1 (Apple Git-122.3)
next prev parent reply other threads:[~2020-04-12 0:15 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-12 0:12 [Tarantool-patches] [PATCH 00/43] Unhide symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 01/43] cmake: remove double usage of some source files Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 10/43] build: export src/lib/core/fiber.c symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 11/43] build: export src/lua/init.c symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 12/43] build: export src/lib/core/port.c symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 13/43] build: export src/lib/csv/csv.c symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 14/43] build: export src/title.c symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 15/43] build: export src/lua/tnt_iconv.c symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 16/43] build: export src/lib/core/exception.cc symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 17/43] build: export src/lib/uuid/tt_uuid.c symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 18/43] build: export src/lib/core/say.c symbols Vladislav Shpilevoy
2020-04-12 0:12 ` [Tarantool-patches] [PATCH 19/43] build: export src/lib/uri/uri.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 02/43] cmake: remove dynamic-list linker option Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 20/43] build: export third_party/PMurHash.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 21/43] build: export src/crc32.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 22/43] build: export src/lua/msgpack.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 23/43] build: export src/main.cc symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 24/43] build: export src/box/space.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 25/43] build: export src/box/schema.cc symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 26/43] build: export src/lib/crypto/crypto.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 27/43] build: export src/lua/buffer.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 28/43] build: export src/lib/swim/swim.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 29/43] build: export src/lib/core/fiber_cond.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 03/43] build: export src/lib/core/clock.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 30/43] build: export src/lib/core/coio.cc symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 31/43] build: export src/lua/utils.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 32/43] build: export src/box/lua/tuple.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 33/43] build: export src/lua/error.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 34/43] build: export src/box/txn.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 35/43] build: export src/box/key_def.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 36/43] build: export src/box/tuple.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 37/43] build: export src/box/index.cc symbols Vladislav Shpilevoy
2020-04-12 0:13 ` Vladislav Shpilevoy [this message]
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 39/43] build: export src/box/error.cc symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 04/43] build: export src/scramble.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 40/43] build: export src/lib/core/diag.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 41/43] build: export src/lib/core/latch.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 42/43] build: export src/lua/string.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 43/43] build: export public Lua symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 05/43] build: export src/lua/socket.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 06/43] build: export third_party/base64.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 07/43] build: export src/lua/digest.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 08/43] build: export src/lib/salad/guava.c symbols Vladislav Shpilevoy
2020-04-12 0:13 ` [Tarantool-patches] [PATCH 09/43] build: export src/lib/core/random.c symbols Vladislav Shpilevoy
2020-04-14 18:14 ` Timur Safin
2020-04-12 11:34 ` [Tarantool-patches] [PATCH 00/43] Unhide symbols Konstantin Osipov
2020-04-12 14:05 ` Vladislav Shpilevoy
2020-04-13 9:40 ` Konstantin Osipov
2020-04-13 9:42 ` Konstantin Osipov
2020-04-13 13:53 ` Vladislav Shpilevoy
2020-04-13 14:15 ` Konstantin Osipov
2020-04-13 14:21 ` Vladislav Shpilevoy
2020-04-13 19:49 ` Sergey Ostanevich
2020-04-13 21:01 ` Vladislav Shpilevoy
2020-04-13 21:38 ` Konstantin Osipov
2020-04-14 18:01 ` Timur Safin
2020-04-14 18:26 ` Timur Safin
2020-04-14 20:41 ` 'Konstantin Osipov'
2020-04-15 10:28 ` Mons Anderson
2020-04-15 10:40 ` Mons Anderson
2020-04-15 10:50 ` sergos
2020-04-15 21:58 ` Vladislav Shpilevoy
2020-04-16 12:13 ` Cyrill Gorcunov
2020-04-16 20:30 ` Vladislav Shpilevoy
2020-04-17 7:48 ` Timur Safin
2020-04-17 8:29 ` Cyrill Gorcunov
2020-04-15 11:27 ` Konstantin Osipov
2020-04-12 14:25 ` Vladislav Shpilevoy
2020-04-12 20:18 ` Vladislav Shpilevoy
2020-04-13 14:26 ` Vladislav Shpilevoy
2020-04-13 16:44 ` Cyrill Gorcunov
2020-04-13 17:57 ` Vladislav Shpilevoy
2020-04-13 18:17 ` Cyrill Gorcunov
2020-04-14 1:15 ` Vladislav Shpilevoy
2020-04-14 1:27 ` [Tarantool-patches] [PATCH 44/43] build: export src/box/lua/console.c symbols Vladislav Shpilevoy
2020-04-15 23:15 ` [Tarantool-patches] [PATCH 00/43] Unhide symbols Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22c6014165fd76c942f401990176d37e35b4f55c.1586650014.git.v.shpilevoy@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 38/43] build: export src/box/box.cc symbols' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox