summaryrefslogtreecommitdiff
path: root/sql/sql_list.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-10-16 13:04:42 +0200
committerSergei Golubchik <sergii@pisem.net>2012-10-16 13:04:42 +0200
commitee9afef27141f55165009fdbd58e54942f3a6867 (patch)
treeb5e15e62e10daa40aef3e6d33eeabf9205d1be0f /sql/sql_list.h
parentd9a8799205d160688f81362356dd2323eb8a91ea (diff)
parenta619bfad30c13207fb0453a85af5740846186900 (diff)
downloadmariadb-git-ee9afef27141f55165009fdbd58e54942f3a6867.tar.gz
mysql-5.5.28
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r--sql/sql_list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h
index e3a04c36071..2b2d9e59771 100644
--- a/sql/sql_list.h
+++ b/sql/sql_list.h
@@ -667,6 +667,9 @@ public:
inline void empty() { first= &last; last.prev= &first; }
base_ilist() { empty(); }
inline bool is_empty() { return first == &last; }
+ // Returns true if p is the last "real" object in the list,
+ // i.e. p->next points to the sentinel.
+ inline bool is_last(ilink *p) { return p->next == NULL || p->next == &last; }
inline void append(ilink *a)
{
first->prev= &a->next;
@@ -742,6 +745,7 @@ class I_List :private base_ilist
{
public:
I_List() :base_ilist() {}
+ inline bool is_last(T *p) { return base_ilist::is_last(p); }
inline void empty() { base_ilist::empty(); }
inline bool is_empty() { return base_ilist::is_empty(); }
inline void append(T* a) { base_ilist::append(a); }