From: Timur Safin <tsafin@tarantool.org> To: v.shpilevoy@tarantool.org, alexander.turenko@tarantool.org Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH 2.X v2.1 2/4] module api: export box_key_def_dup Date: Sun, 11 Oct 2020 17:39:50 +0300 [thread overview] Message-ID: <abcdb17c4695cc0cc5e75ca10bacdc40f7866b5d.1602425022.git.tsafin@tarantool.org> (raw) In-Reply-To: <cover.1602425022.git.tsafin@tarantool.org> Exporting `box_key_def_dup` as accessor to the internal `key_def_dup` Part of #5384 --- src/box/key_def_api.c | 6 ++++++ src/box/key_def_api.h | 10 ++++++++++ src/exports.h | 1 + 3 files changed, 17 insertions(+) diff --git a/src/box/key_def_api.c b/src/box/key_def_api.c index 2555b9fdd..98602ff24 100644 --- a/src/box/key_def_api.c +++ b/src/box/key_def_api.c @@ -199,6 +199,12 @@ box_key_def_new_ex(box_key_part_def_t *parts, uint32_t part_count) return key_def; } +box_key_def_t * +box_key_def_dup(const box_key_def_t *key_def) +{ + return key_def_dup(key_def); +} + void box_key_def_delete(box_key_def_t *key_def) { diff --git a/src/box/key_def_api.h b/src/box/key_def_api.h index 8dd6eb10b..a419b712c 100644 --- a/src/box/key_def_api.h +++ b/src/box/key_def_api.h @@ -173,6 +173,16 @@ box_key_part_def_create(box_key_part_def_t *part); API_EXPORT box_key_def_t * box_key_def_new_ex(box_key_part_def_t *parts, uint32_t part_count); +/** + * Duplicate key_def. + * \param key_def Original key_def. + * + * \retval not NULL Duplicate of src. + * \retval NULL Memory error. + */ +box_key_def_t * +box_key_def_dup(const box_key_def_t *key_def); + /** * Delete key definition * diff --git a/src/exports.h b/src/exports.h index 592b388bb..202f5bf19 100644 --- a/src/exports.h +++ b/src/exports.h @@ -31,6 +31,7 @@ EXPORT(box_iterator_free) EXPORT(box_iterator_next) EXPORT(box_key_def_delete) EXPORT(box_key_def_dump_parts) +EXPORT(box_key_def_dup) EXPORT(box_key_def_merge) EXPORT(box_key_def_new) EXPORT(box_key_def_new_ex) -- 2.20.1
next prev parent reply other threads:[~2020-10-11 14:40 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-11 14:39 [Tarantool-patches] [PATCH 2.X v2.1 0/4] module api: extend for external merger Lua module Timur Safin 2020-10-11 14:39 ` [Tarantool-patches] [PATCH 2.X v2.1 1/4] module api: export box_tuple_validate Timur Safin 2020-10-11 15:42 ` Vladislav Shpilevoy 2020-10-11 15:51 ` Timur Safin 2020-10-11 14:39 ` Timur Safin [this message] 2020-10-11 14:39 ` [Tarantool-patches] [PATCH 2.X v2.1 3/4] module api: luaL_checkibuf Timur Safin 2020-10-11 14:39 ` [Tarantool-patches] [PATCH 2.X v2.1 4/4] module api: external merger tests Timur Safin
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=abcdb17c4695cc0cc5e75ca10bacdc40f7866b5d.1602425022.git.tsafin@tarantool.org \ --to=tsafin@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 2.X v2.1 2/4] module api: export box_key_def_dup' \ /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