Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0b89bb79
Commit
0b89bb79
authored
Jan 03, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Add __attribute__((const)) or __attribute__((pure))
to all fold functions.
parent
81334fe6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
9 deletions
+18
-9
include/buf0buf.h
include/buf0buf.h
+2
-1
include/data0data.h
include/data0data.h
+2
-1
include/lock0lock.h
include/lock0lock.h
+2
-1
include/rem0rec.h
include/rem0rec.h
+2
-1
include/ut0rnd.h
include/ut0rnd.h
+10
-5
No files found.
include/buf0buf.h
View file @
0b89bb79
...
...
@@ -880,7 +880,8 @@ buf_page_address_fold(
/*==================*/
/* out: the folded value */
ulint
space
,
/* in: space id */
ulint
offset
);
/* in: offset of the page within space */
ulint
offset
)
/* in: offset of the page within space */
__attribute__
((
const
));
/**********************************************************************
Returns the control block of a file page, NULL if not found. */
UNIV_INLINE
...
...
include/data0data.h
View file @
0b89bb79
...
...
@@ -262,7 +262,8 @@ dtuple_fold(
ulint
n_fields
,
/* in: number of complete fields to fold */
ulint
n_bytes
,
/* in: number of bytes to fold in an
incomplete last field */
dulint
tree_id
);
/* in: index tree id */
dulint
tree_id
)
/* in: index tree id */
__attribute__
((
pure
));
/***********************************************************************
Sets types of fields binary in a tuple. */
UNIV_INLINE
...
...
include/lock0lock.h
View file @
0b89bb79
...
...
@@ -545,7 +545,8 @@ lock_rec_fold(
/*==========*/
/* out: folded value */
ulint
space
,
/* in: space */
ulint
page_no
);
/* in: page number */
ulint
page_no
)
/* in: page number */
__attribute__
((
const
));
/*************************************************************************
Calculates the hash value of a page file address: used in inserting or
searching for a lock in the hash table. */
...
...
include/rem0rec.h
View file @
0b89bb79
...
...
@@ -586,7 +586,8 @@ rec_fold(
fields to fold */
ulint
n_bytes
,
/* in: number of bytes to fold
in an incomplete last field */
dulint
tree_id
);
/* in: index tree id */
dulint
tree_id
)
/* in: index tree id */
__attribute__
((
pure
));
/*************************************************************
Builds a physical record out of a data tuple and
stores it into the given buffer. */
...
...
include/ut0rnd.h
View file @
0b89bb79
...
...
@@ -77,7 +77,8 @@ ut_fold_ulint_pair(
/*===============*/
/* out: folded value */
ulint
n1
,
/* in: ulint */
ulint
n2
);
/* in: ulint */
ulint
n2
)
/* in: ulint */
__attribute__
((
const
));
/*****************************************************************
Folds a dulint. */
UNIV_INLINE
...
...
@@ -85,7 +86,8 @@ ulint
ut_fold_dulint
(
/*===========*/
/* out: folded value */
dulint
d
);
/* in: dulint */
dulint
d
)
/* in: dulint */
__attribute__
((
const
));
/*****************************************************************
Folds a character string ending in the null character. */
UNIV_INLINE
...
...
@@ -93,7 +95,8 @@ ulint
ut_fold_string
(
/*===========*/
/* out: folded value */
const
char
*
str
);
/* in: null-terminated string */
const
char
*
str
)
/* in: null-terminated string */
__attribute__
((
pure
));
/*****************************************************************
Folds a binary string. */
UNIV_INLINE
...
...
@@ -102,7 +105,8 @@ ut_fold_binary(
/*===========*/
/* out: folded value */
const
byte
*
str
,
/* in: string of bytes */
ulint
len
);
/* in: length */
ulint
len
)
/* in: length */
__attribute__
((
pure
));
/***************************************************************
Looks for a prime number slightly greater than the given argument.
The prime is chosen so that it is not near any power of 2. */
...
...
@@ -111,7 +115,8 @@ ulint
ut_find_prime
(
/*==========*/
/* out: prime */
ulint
n
);
/* in: positive number > 100 */
ulint
n
)
/* in: positive number > 100 */
__attribute__
((
const
));
#ifndef UNIV_NONINL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment