box: introduce box_tuple_data C API#11558
Merged
sergepetrenko merged 2 commits intotarantool:masterfrom Jun 9, 2025
Merged
Conversation
f0c60ee to
04f6c6e
Compare
Totktonada
reviewed
May 30, 2025
Totktonada
reviewed
May 30, 2025
Totktonada
reviewed
May 30, 2025
Totktonada
reviewed
May 30, 2025
lenkis
approved these changes
Jun 2, 2025
04f6c6e to
91bd4da
Compare
sergepetrenko
requested changes
Jun 3, 2025
Collaborator
sergepetrenko
left a comment
There was a problem hiding this comment.
Thanks for the patch!
Add the `API_EXPORT` attributes to API functions exported in `extra/exports` to ones in `box/tuple.h`. Part of tarantool#11478 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
Expose `box_tuple_data` API for cases where introducing copies with `box_tuple_to_buf` is undesirable. Fixes tarantool#11478 @TarantoolBot document Title: `box_tuple_data` to get a pointer to the underlying MsgPack data. Added new C function `box_tuple_data` to inspect raw MsgPack data. It is similar to the `box_tuple_to_buf` but the former gives one an access to the data pointer directly, not to a copy in a buffer. The 'bsize' argument will be set to the `box_tuple_bsize` result if it is not NULL. ```C const char * box_tuple_data(box_tuple_t *tuple, size_t *bsize); ```
91bd4da to
e0e1769
Compare
Totktonada
approved these changes
Jun 6, 2025
sergepetrenko
approved these changes
Jun 9, 2025
Collaborator
sergepetrenko
left a comment
There was a problem hiding this comment.
Thanks for the fixes!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose
box_tuple_dataAPI for cases where introducing copies withbox_tuple_to_bufis undesirable.Fixes #11478