[PATCH 02/12] vinyl: make vy_tuple_delete static
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Feb 21 13:26:02 MSK 2019
It isn't used anywhere outside vy_stmt.c.
---
src/box/vy_stmt.c | 16 ++++++++--------
src/box/vy_stmt.h | 7 -------
2 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/src/box/vy_stmt.c b/src/box/vy_stmt.c
index af5c6408..618e6025 100644
--- a/src/box/vy_stmt.c
+++ b/src/box/vy_stmt.c
@@ -94,14 +94,7 @@ vy_tuple_new(struct tuple_format *format, const char *data, const char *end)
return tuple;
}
-struct tuple_format_vtab vy_tuple_format_vtab = {
- vy_tuple_delete,
- vy_tuple_new,
-};
-
-size_t vy_max_tuple_size = 1024 * 1024;
-
-void
+static void
vy_tuple_delete(struct tuple_format *format, struct tuple *tuple)
{
say_debug("%s(%p)", __func__, tuple);
@@ -119,6 +112,13 @@ vy_tuple_delete(struct tuple_format *format, struct tuple *tuple)
free(tuple);
}
+struct tuple_format_vtab vy_tuple_format_vtab = {
+ vy_tuple_delete,
+ vy_tuple_new,
+};
+
+size_t vy_max_tuple_size = 1024 * 1024;
+
/**
* Allocate a vinyl statement object on base of the struct tuple
* with malloc() and the reference counter equal to 1.
diff --git a/src/box/vy_stmt.h b/src/box/vy_stmt.h
index d131a461..dd1f2460 100644
--- a/src/box/vy_stmt.h
+++ b/src/box/vy_stmt.h
@@ -220,13 +220,6 @@ vy_stmt_set_n_upserts(struct tuple *stmt, uint8_t n)
}
/**
- * Free the tuple of a vinyl space.
- * @pre tuple->refs == 0
- */
-void
-vy_tuple_delete(struct tuple_format *format, struct tuple *tuple);
-
-/**
* Duplicate the statememnt.
*
* @param stmt statement
--
2.11.0
More information about the Tarantool-patches
mailing list