[Tarantool-patches] [PATCH 1.10 2/9] module api: export box_key_def_dup

Timur Safin tsafin at tarantool.org
Fri Sep 25 00:00:34 MSK 2020


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

Part of #5273
---
 src/box/key_def_api.c |  6 ++++++
 src/box/key_def_api.h | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/src/box/key_def_api.c b/src/box/key_def_api.c
index 55fbc53ce..5c775f1a9 100644
--- a/src/box/key_def_api.c
+++ b/src/box/key_def_api.c
@@ -175,6 +175,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 b85ed7f3c..829871ed9 100644
--- a/src/box/key_def_api.h
+++ b/src/box/key_def_api.h
@@ -153,6 +153,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
  *
-- 
2.20.1



More information about the Tarantool-patches mailing list