branches/zip: ha_node_set_data(): Define a wrapper macro, and rename the

function to ha_node_set_data_func().  In this way, the #ifdef in the
callers can be removed.
This commit is contained in:
marko 2006-11-21 10:34:42 +00:00
parent 7d920dbaca
commit a9ffc8a7fe
2 changed files with 9 additions and 7 deletions

View file

@ -133,11 +133,7 @@ ha_insert_for_fold_func(
return(FALSE);
}
ha_node_set_data(node,
#ifdef UNIV_DEBUG
block,
#endif /* UNIV_DEBUG */
data);
ha_node_set_data(node, block, data);
#ifdef UNIV_DEBUG
if (table->adaptive) {

View file

@ -34,8 +34,8 @@ ha_node_get_data(
Sets hash node data. */
UNIV_INLINE
void
ha_node_set_data(
/*=============*/
ha_node_set_data_func(
/*==================*/
ha_node_t* node, /* in: hash chain node */
#ifdef UNIV_DEBUG
buf_block_t* block, /* in: buffer block containing the data */
@ -48,6 +48,12 @@ ha_node_set_data(
node->data = data;
}
#ifdef UNIV_DEBUG
# define ha_node_set_data(n,b,d) ha_node_set_data_func(n,b,d)
#else /* UNIV_DEBUG */
# define ha_node_set_data(n,b,d) ha_node_set_data_func(n,d)
#endif /* UNIV_DEBUG */
/**********************************************************************
Gets the next node in a hash chain. */
UNIV_INLINE