[Tarantool-patches] [PATCH v9 7/7] xrow: drop xrow_header_dup_body

Serge Petrenko sergepetrenko at tarantool.org
Fri Aug 21 11:57:23 MSK 2020


LGTM.
 
  
>Четверг, 20 августа 2020, 0:36 +03:00 от Cyrill Gorcunov <gorcunov at gmail.com>:
> 
>We no longer use it.
>
>Closes #5129
>
>Signed-off-by: Cyrill Gorcunov < gorcunov at gmail.com >
>---
> src/box/xrow.c | 15 ---------------
> src/box/xrow.h | 8 --------
> 2 files changed, 23 deletions(-)
>
>diff --git a/src/box/xrow.c b/src/box/xrow.c
>index 9c6fb4fc1..95ddb1fe7 100644
>--- a/src/box/xrow.c
>+++ b/src/box/xrow.c
>@@ -220,21 +220,6 @@ xrow_header_decode(struct xrow_header *header, const char **pos,
>  return 0;
> }
> 
>-int
>-xrow_header_dup_body(struct xrow_header *row, struct region *region)
>-{
>- assert(row->bodycnt == 1);
>- size_t size = row->body[0].iov_len;
>- char *copy = (char *)region_alloc(region, size);
>- if (copy == NULL) {
>- diag_set(OutOfMemory, size, "region_alloc", "copy");
>- return -1;
>- }
>- memcpy(copy, row->body[0].iov_base, size);
>- row->body[0].iov_base = copy;
>- return 1;
>-}
>-
> /**
>  * @pre pos points at a valid msgpack
>  */
>diff --git a/src/box/xrow.h b/src/box/xrow.h
>index 20e82034d..58d47b12d 100644
>--- a/src/box/xrow.h
>+++ b/src/box/xrow.h
>@@ -141,14 +141,6 @@ int
> xrow_header_decode(struct xrow_header *header, const char **pos,
>  const char *end, bool end_is_exact);
> 
>-/**
>- * Duplicate the xrow's body onto the given region.
>- * @retval -1 Error.
>- * @retval >= 0 Iov count in the body.
>- */
>-int
>-xrow_header_dup_body(struct xrow_header *header, struct region *region);
>-
> /**
>  * DML request.
>  */
>--
>2.26.2
> 
 
--
Serge Petrenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20200821/34bb56f3/attachment.html>


More information about the Tarantool-patches mailing list