~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/ut0lst.h

  • Committer: Brian Aker
  • Date: 2010-12-25 00:28:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: brian@tangent.org-20101225002849-g73mg6ihulajis0o
First pass in refactoring of the name of my_decimal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
to both ends of the list and a count of nodes in the list (excluding
40
40
the base node from the count).
41
41
@param TYPE     the name of the list node data type */
42
 
#ifdef __cplusplus
43
 
template<class T>
44
 
class ut_list_base_node
45
 
{
46
 
public:
47
 
  size_t count; /*!< count of nodes in list */\
48
 
  T *   start;  /*!< pointer to list start, NULL if empty */\
49
 
  T *   end;    /*!< pointer to list end, NULL if empty */\
50
 
};
51
 
#define UT_LIST_BASE_NODE_T(TYPE) ut_list_base_node<TYPE>
52
 
#else
53
 
#define UT_LIST_BASE_NODE_T(TYPE) int
54
 
#endif
 
42
#define UT_LIST_BASE_NODE_T(TYPE)\
 
43
struct {\
 
44
        ulint   count;  /*!< count of nodes in list */\
 
45
        TYPE *  start;  /*!< pointer to list start, NULL if empty */\
 
46
        TYPE *  end;    /*!< pointer to list end, NULL if empty */\
 
47
}\
55
48
 
56
49
/*******************************************************************//**
57
50
This macro expands to the unnamed type definition of a struct which
227
220
Gets the last node in a two-way list.
228
221
@param BASE     the base node (not a pointer to it)
229
222
@return         last node, or NULL if the list is empty */
230
 
#ifdef __cplusplus
231
223
#define UT_LIST_GET_LAST(BASE)\
232
224
        (BASE).end
233
 
#else
234
 
#define UT_LIST_GET_LAST(BASE) (BASE= NULL)
235
 
#endif
236
225
 
237
226
/********************************************************************//**
238
227
Checks the consistency of a two-way list.