Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
d91e48ab
Commit
d91e48ab
authored
7 years ago
by
Vladislav Shpilevoy
Committed by
Konstantin Osipov
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
tuple: make tuple_field.. functions family take const tuple
parent
6474175a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/box/tuple.h
+4
-4
4 additions, 4 deletions
src/box/tuple.h
with
4 additions
and
4 deletions
src/box/tuple.h
+
4
−
4
View file @
d91e48ab
...
...
@@ -698,7 +698,7 @@ tuple_field_xc(const struct tuple *tuple, uint32_t fieldno,
* as uint64_t.
*/
static
inline
uint64_t
tuple_field_u64_xc
(
struct
tuple
*
tuple
,
uint32_t
fieldno
)
tuple_field_u64_xc
(
const
struct
tuple
*
tuple
,
uint32_t
fieldno
)
{
const
char
*
field
=
tuple_field_xc
(
tuple
,
fieldno
,
MP_UINT
);
return
mp_decode_uint
(
&
field
);
...
...
@@ -709,7 +709,7 @@ tuple_field_u64_xc(struct tuple *tuple, uint32_t fieldno)
* as uint32_t.
*/
static
inline
uint32_t
tuple_field_u32_xc
(
struct
tuple
*
tuple
,
uint32_t
fieldno
)
tuple_field_u32_xc
(
const
struct
tuple
*
tuple
,
uint32_t
fieldno
)
{
uint64_t
val
=
tuple_field_u64_xc
(
tuple
,
fieldno
);
if
(
val
>
UINT32_MAX
)
{
...
...
@@ -725,7 +725,7 @@ tuple_field_u32_xc(struct tuple *tuple, uint32_t fieldno)
* as a NUL-terminated string - returns a string of up to 256 bytes.
*/
static
inline
const
char
*
tuple_field_cstr_xc
(
struct
tuple
*
tuple
,
uint32_t
fieldno
)
tuple_field_cstr_xc
(
const
struct
tuple
*
tuple
,
uint32_t
fieldno
)
{
const
char
*
field
=
tuple_field_xc
(
tuple
,
fieldno
,
MP_STR
);
uint32_t
len
=
0
;
...
...
@@ -738,7 +738,7 @@ tuple_field_cstr_xc(struct tuple *tuple, uint32_t fieldno)
* representation of UUID, and return a 16-byte representation.
*/
static
inline
void
tuple_field_uuid_xc
(
struct
tuple
*
tuple
,
int
fieldno
,
struct
tt_uuid
*
result
)
tuple_field_uuid_xc
(
const
struct
tuple
*
tuple
,
int
fieldno
,
struct
tt_uuid
*
result
)
{
const
char
*
value
=
tuple_field_cstr_xc
(
tuple
,
fieldno
);
if
(
tt_uuid_from_string
(
value
,
result
)
!=
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment