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
756a8b29
Commit
756a8b29
authored
Aug 22, 2007
by
vasil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Add a hash_table_clear() function to drop all elements that
have been added to it. Approved by: Marko
parent
e7d302e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
include/hash0hash.h
include/hash0hash.h
+9
-0
include/hash0hash.ic
include/hash0hash.ic
+12
-0
No files found.
include/hash0hash.h
View file @
756a8b29
...
...
@@ -178,6 +178,15 @@ hash_get_nth_cell(
/* out: pointer to cell */
hash_table_t
*
table
,
/* in: hash table */
ulint
n
);
/* in: cell index */
/*****************************************************************
Clears a hash table so that all the cells become empty again. */
UNIV_INLINE
void
hash_table_clear
(
/*=============*/
hash_table_t
*
table
);
/* in/out: hash table */
/*****************************************************************
Returns the number of cells in a hash table. */
UNIV_INLINE
...
...
include/hash0hash.ic
View file @
756a8b29
...
...
@@ -23,6 +23,18 @@ hash_get_nth_cell(
return(table->array + n);
}
/*****************************************************************
Clears a hash table so that all the cells become empty again. */
UNIV_INLINE
void
hash_table_clear(
/*=============*/
hash_table_t* table) /* in/out: hash table */
{
memset(table->array, 0x0,
table->n_cells * sizeof(*table->array));
}
/*****************************************************************
Returns the number of cells in a hash table. */
UNIV_INLINE
...
...
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