1/* Inline Functions for keyword-list.{h,cc}. 2 3 Copyright (C) 2002-2003 Free Software Foundation, Inc. 4 Written by Bruno Haible <bruno@clisp.org>. 5 6 This file is part of GNU GPERF. 7 8 GNU GPERF is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 2, or (at your option) 11 any later version. 12 13 GNU GPERF is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; see the file COPYING. 20 If not, write to the Free Software Foundation, Inc., 21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 22 23/* -------------------------- Keyword_List class --------------------------- */ 24 25/* Access to first element of list. */ 26INLINE Keyword * 27Keyword_List::first () const 28{ 29 return _car; 30} 31 32/* Access to next element of list. */ 33INLINE Keyword_List *& 34Keyword_List::rest () 35{ 36 return _cdr; 37} 38 39/* ------------------------- KeywordExt_List class ------------------------- */ 40 41/* Access to first element of list. */ 42INLINE KeywordExt * 43KeywordExt_List::first () const 44{ 45 return static_cast<KeywordExt*>(_car); 46} 47 48/* Access to next element of list. */ 49INLINE KeywordExt_List *& 50KeywordExt_List::rest () 51{ 52 return *reinterpret_cast<KeywordExt_List**>(&_cdr); 53} 54