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
44f9d069
Commit
44f9d069
authored
Sep 28, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Define buf_block_get_frame() as a const-preserving macro.
parent
14b70068
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
include/buf0buf.h
include/buf0buf.h
+6
-3
include/buf0buf.ic
include/buf0buf.ic
+6
-5
No files found.
include/buf0buf.h
View file @
44f9d069
...
...
@@ -774,16 +774,19 @@ buf_page_set_accessed(
/*==================*/
buf_page_t
*
bpage
,
/* in/out: control block */
ibool
accessed
);
/* in: accessed */
#ifdef UNIV_DEBUG
/*************************************************************************
Gets a pointer to the memory frame of a block. */
UNIV_INLINE
buf_frame_t
*
buf_block_get_frame
(
/*================*/
/* out: pointer to the frame */
buf_block_t
*
block
)
/* in: pointer to the control block */
/* out: pointer to the frame */
const
buf_block_t
*
block
)
/* in: pointer to the control block */
__attribute__
((
pure
));
#else
/* UNIV_DEBUG */
# define buf_block_get_frame(block) block->frame
#endif
/* UNIV_DEBUG */
/*************************************************************************
Gets the space id of a block. */
UNIV_INLINE
...
...
include/buf0buf.ic
View file @
44f9d069
...
...
@@ -460,17 +460,18 @@ buf_page_set_accessed(
bpage->accessed = accessed;
}
#ifdef UNIV_DEBUG
/*************************************************************************
Gets a pointer to the memory frame of a block. */
UNIV_INLINE
buf_frame_t*
buf_block_get_frame(
/*================*/
/* out: pointer to the frame */
buf_block_t* block) /* in: pointer to the control block */
/* out: pointer to the frame */
const
buf_block_t* block) /* in: pointer to the control block */
{
ut_ad(block);
#ifdef UNIV_DEBUG
switch (buf_block_get_state(block)) {
case BUF_BLOCK_ZIP_FREE:
case BUF_BLOCK_ZIP_PAGE:
...
...
@@ -488,9 +489,9 @@ buf_block_get_frame(
}
ut_error;
ok:
#endif /* UNIV_DEBUG */
return(block->frame);
return((buf_frame_t*) block->frame);
}
#endif /* UNIV_DEBUG */
/*************************************************************************
Gets the space id of a block. */
...
...
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