Commit a9ffc8a7 authored by marko's avatar marko

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.
parent 7d920dba
...@@ -133,11 +133,7 @@ ha_insert_for_fold_func( ...@@ -133,11 +133,7 @@ ha_insert_for_fold_func(
return(FALSE); return(FALSE);
} }
ha_node_set_data(node, ha_node_set_data(node, block, data);
#ifdef UNIV_DEBUG
block,
#endif /* UNIV_DEBUG */
data);
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
if (table->adaptive) { if (table->adaptive) {
......
...@@ -34,8 +34,8 @@ ha_node_get_data( ...@@ -34,8 +34,8 @@ ha_node_get_data(
Sets hash node data. */ Sets hash node data. */
UNIV_INLINE UNIV_INLINE
void void
ha_node_set_data( ha_node_set_data_func(
/*=============*/ /*==================*/
ha_node_t* node, /* in: hash chain node */ ha_node_t* node, /* in: hash chain node */
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
buf_block_t* block, /* in: buffer block containing the data */ buf_block_t* block, /* in: buffer block containing the data */
...@@ -48,6 +48,12 @@ ha_node_set_data( ...@@ -48,6 +48,12 @@ ha_node_set_data(
node->data = 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. */ Gets the next node in a hash chain. */
UNIV_INLINE UNIV_INLINE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment