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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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
Show 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,7 +774,7 @@ 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
...
...
@@ -782,8 +782,11 @@ buf_frame_t*
buf_block_get_frame
(
/*================*/
/* out: pointer to the frame */
buf_block_t
*
block
)
/* in: pointer to the control block */
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,6 +460,7 @@ buf_page_set_accessed(
bpage->accessed = accessed;
}
#ifdef UNIV_DEBUG
/*************************************************************************
Gets a pointer to the memory frame of a block. */
UNIV_INLINE
...
...
@@ -467,10 +468,10 @@ buf_frame_t*
buf_block_get_frame(
/*================*/
/* out: pointer to the frame */
buf_block_t* block) /* in: pointer to the control block */
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