Tarantool development patches archive
 help / color / mirror / Atom feed
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 1.10 v3 2/4] module api: export box_key_def_dup
Date: Mon, 12 Oct 2020 03:50:38 +0300	[thread overview]
Message-ID: <14f0c490cc754e46b9ad75760cbaebeb648905b0.1602463038.git.tsafin@tarantool.org> (raw)
In-Reply-To: <cover.1602463038.git.tsafin@tarantool.org>

Exporting `box_key_def_dup` as accessor to the internal `key_def_dup`

Part of #5384
---
 extra/exports     |  1 +
 src/box/key_def.c |  6 ++++++
 src/box/key_def.h | 10 ++++++++++
 3 files changed, 17 insertions(+)

diff --git a/extra/exports b/extra/exports
index aa9f5defe..9e2023685 100644
--- a/extra/exports
+++ b/extra/exports
@@ -149,6 +149,7 @@ box_key_def_new
 box_key_def_delete
 box_key_def_dump_parts
 box_key_def_new_v2
+box_key_def_dup
 box_key_def_merge
 box_key_def_validate_tuple
 box_key_def_extract_key
diff --git a/src/box/key_def.c b/src/box/key_def.c
index d118c5802..35e836c8c 100644
--- a/src/box/key_def.c
+++ b/src/box/key_def.c
@@ -333,6 +333,12 @@ box_key_def_new_v2(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.h b/src/box/key_def.h
index 32e722f36..9e9e5c85b 100644
--- a/src/box/key_def.h
+++ b/src/box/key_def.h
@@ -281,6 +281,16 @@ box_key_part_def_create(box_key_part_def_t *part);
 API_EXPORT box_key_def_t *
 box_key_def_new_v2(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.
+ */
+API_EXPORT box_key_def_t *
+box_key_def_dup(const box_key_def_t *key_def);
+
 /**
  * Delete key definition
  *
-- 
2.20.1

  parent reply	other threads:[~2020-10-12  0:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12  0:50 [Tarantool-patches] [PATCH 1.10 v3 0/4] module api: extend for external merger Lua module Timur Safin
2020-10-12  0:50 ` [Tarantool-patches] [PATCH 1.10 v3 1/4] module api: export box_tuple_validate Timur Safin
2020-10-12  0:50 ` Timur Safin [this message]
2020-10-12  0:50 ` [Tarantool-patches] [PATCH 1.10 v3 3/4] module api: luaL_checkibuf Timur Safin
2020-10-12  7:43   ` Timur Safin
2020-10-12  0:50 ` [Tarantool-patches] [PATCH 1.10 v3 4/4] module api: add luaL_iscallable with support of cdata metatype Timur Safin
2020-10-13 11:58   ` Alexander Turenko
2020-10-12  9:19 ` [Tarantool-patches] [PATCH 1.10 v3 0/4] module api: extend for external merger Lua module 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=14f0c490cc754e46b9ad75760cbaebeb648905b0.1602463038.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 1.10 v3 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