[Tarantool-patches] [PATCH v2 1/3] tuple: rename tuple_update.c/h to xrow_update.c/h
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Wed Nov 6 18:13:44 MSK 2019
Tuple_update is a too general name for the updates implemented
in these files. Indeed, a tuple can be updated from Lua, from
SQL, from update microlanguage. Xrow_update is a more specific
name, which is already widely used in tuple_update.c.
Part of #1261
---
src/box/CMakeLists.txt | 2 +-
src/box/lua/tuple.c | 2 +-
src/box/memtx_space.c | 2 +-
src/box/space.c | 2 +-
src/box/tuple.c | 3 +--
src/box/tuple.h | 2 +-
src/box/vinyl.c | 2 +-
src/box/vy_upsert.c | 2 +-
src/box/{tuple_update.c => xrow_update.c} | 3 +--
src/box/{tuple_update.h => xrow_update.h} | 6 +++---
test/unit/column_mask.c | 2 +-
11 files changed, 13 insertions(+), 15 deletions(-)
rename src/box/{tuple_update.c => xrow_update.c} (99%)
rename src/box/{tuple_update.h => xrow_update.h} (95%)
diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt
index 9d2fcea4b..2f921fc1c 100644
--- a/src/box/CMakeLists.txt
+++ b/src/box/CMakeLists.txt
@@ -40,7 +40,7 @@ add_library(tuple STATIC
tuple.c
field_map.c
tuple_format.c
- tuple_update.c
+ xrow_update.c
tuple_compare.cc
tuple_extract_key.cc
tuple_hash.cc
diff --git a/src/box/lua/tuple.c b/src/box/lua/tuple.c
index 4b6298cb5..f97df4bc0 100644
--- a/src/box/lua/tuple.c
+++ b/src/box/lua/tuple.c
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*/
#include "box/lua/tuple.h"
-#include "box/tuple_update.h"
+#include "box/xrow_update.h"
#include "lua/utils.h" /* luaT_error() */
#include "lua/msgpack.h" /* luamp_encode_XXX() */
diff --git a/src/box/memtx_space.c b/src/box/memtx_space.c
index 601e98ce5..86de4dada 100644
--- a/src/box/memtx_space.c
+++ b/src/box/memtx_space.c
@@ -33,7 +33,7 @@
#include "iproto_constants.h"
#include "txn.h"
#include "tuple.h"
-#include "tuple_update.h"
+#include "xrow_update.h"
#include "xrow.h"
#include "memtx_hash.h"
#include "memtx_tree.h"
diff --git a/src/box/space.c b/src/box/space.c
index 042be042c..f0c1f2ce8 100644
--- a/src/box/space.c
+++ b/src/box/space.c
@@ -39,7 +39,7 @@
#include "session.h"
#include "txn.h"
#include "tuple.h"
-#include "tuple_update.h"
+#include "xrow_update.h"
#include "request.h"
#include "xrow.h"
#include "iproto_constants.h"
diff --git a/src/box/tuple.c b/src/box/tuple.c
index 261505f9a..04a723892 100644
--- a/src/box/tuple.c
+++ b/src/box/tuple.c
@@ -35,8 +35,7 @@
#include "fiber.h"
#include "small/quota.h"
#include "small/small.h"
-
-#include "tuple_update.h"
+#include "xrow_update.h"
#include "coll_id_cache.h"
static struct mempool tuple_iterator_pool;
diff --git a/src/box/tuple.h b/src/box/tuple.h
index ab0c7a99b..db615ce1a 100644
--- a/src/box/tuple.h
+++ b/src/box/tuple.h
@@ -1115,7 +1115,7 @@ tuple_to_buf(struct tuple *tuple, char *buf, size_t size);
#if defined(__cplusplus)
} /* extern "C" */
-#include "tuple_update.h"
+#include "xrow_update.h"
#include "errinj.h"
/* @copydoc tuple_field_with_type() */
diff --git a/src/box/vinyl.c b/src/box/vinyl.c
index a2bbaa529..2f0b548af 100644
--- a/src/box/vinyl.c
+++ b/src/box/vinyl.c
@@ -58,7 +58,7 @@
#include "coio_task.h"
#include "cbus.h"
#include "histogram.h"
-#include "tuple_update.h"
+#include "xrow_update.h"
#include "txn.h"
#include "xrow.h"
#include "xlog.h"
diff --git a/src/box/vy_upsert.c b/src/box/vy_upsert.c
index 817d29cfd..5b4a75d25 100644
--- a/src/box/vy_upsert.c
+++ b/src/box/vy_upsert.c
@@ -34,7 +34,7 @@
#include <small/region.h>
#include <msgpuck/msgpuck.h>
#include "vy_stmt.h"
-#include "tuple_update.h"
+#include "xrow_update.h"
#include "fiber.h"
#include "column_mask.h"
diff --git a/src/box/tuple_update.c b/src/box/xrow_update.c
similarity index 99%
rename from src/box/tuple_update.c
rename to src/box/xrow_update.c
index 9e926d59d..958ed1c99 100644
--- a/src/box/tuple_update.c
+++ b/src/box/xrow_update.c
@@ -28,8 +28,7 @@
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
-#include "tuple_update.h"
+#include "xrow_update.h"
#include <stdbool.h>
#include "say.h"
diff --git a/src/box/tuple_update.h b/src/box/xrow_update.h
similarity index 95%
rename from src/box/tuple_update.h
rename to src/box/xrow_update.h
index b6210dd38..3aac74e60 100644
--- a/src/box/tuple_update.h
+++ b/src/box/xrow_update.h
@@ -1,5 +1,5 @@
-#ifndef TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED
-#define TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED
+#ifndef TARANTOOL_BOX_XROW_UPDATE_H_INCLUDED
+#define TARANTOOL_BOX_XROW_UPDATE_H_INCLUDED
/*
* Copyright 2010-2016, Tarantool AUTHORS, please see AUTHORS file.
*
@@ -83,4 +83,4 @@ tuple_upsert_squash(const char *expr1, const char *expr1_end,
} /* extern "C" */
#endif /* defined(__cplusplus) */
-#endif /* TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED */
+#endif /* TARANTOOL_BOX_XROW_UPDATE_H_INCLUDED */
diff --git a/test/unit/column_mask.c b/test/unit/column_mask.c
index 5ee8b7332..b3047860e 100644
--- a/test/unit/column_mask.c
+++ b/test/unit/column_mask.c
@@ -1,5 +1,5 @@
#include "column_mask.h"
-#include "tuple_update.h"
+#include "xrow_update.h"
#include "unit.h"
#include "msgpuck.h"
#include "trivia/util.h"
--
2.21.0 (Apple Git-122.2)
More information about the Tarantool-patches
mailing list