Skip to content

Commit 25cb444

Browse files
author
Davi Arnaut
committed
Move I_P_List_adapter to sql_plist.h as it is currently being used
for code other then in mdl.h. Since the adapter is generic, it is better located in sql_plist.h. --BZR-- revision-id: [email protected] property-branch-nick: mysql-5.5 testament3-sha1: e9ee3c6fd31708fef235f79feeeae880b0930ca2
1 parent e651789 commit 25cb444

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

sql/mdl.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -286,21 +286,6 @@ class MDL_key
286286
};
287287

288288

289-
290-
/**
291-
Hook class which via its methods specifies which members
292-
of T should be used for participating in MDL lists.
293-
*/
294-
295-
template <typename T, T* T::*next, T** T::*prev>
296-
struct I_P_List_adapter
297-
{
298-
static inline T **next_ptr(T *el) { return &(el->*next); }
299-
300-
static inline T ***prev_ptr(T *el) { return &(el->*prev); }
301-
};
302-
303-
304289
/**
305290
A pending metadata lock request.
306291

sql/sql_plist.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,20 @@ class I_P_List_iterator
187187
};
188188

189189

190+
/**
191+
Hook class which via its methods specifies which members
192+
of T should be used for participating in a intrusive list.
193+
*/
194+
195+
template <typename T, T* T::*next, T** T::*prev>
196+
struct I_P_List_adapter
197+
{
198+
static inline T **next_ptr(T *el) { return &(el->*next); }
199+
200+
static inline T ***prev_ptr(T *el) { return &(el->*prev); }
201+
};
202+
203+
190204
/**
191205
Element counting policy class for I_P_List to be used in
192206
cases when no element counting should be done.

0 commit comments

Comments
 (0)