#ifndef SCM_KEYWORDS_INTERNAL_H
#define SCM_KEYWORDS_INTERNAL_H
/* Copyright 1995-1996,1999-2001,2006,2008,2015,2018-2019,2025
Free Software Foundation, Inc.
This file is part of Guile.
Guile is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Guile is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with Guile. If not, see
. */
#include
#include
struct scm_keyword
{
scm_t_bits tag;
SCM symbol;
};
static inline struct scm_keyword *
scm_to_keyword (SCM x)
{
return (struct scm_keyword *) SCM_UNPACK_POINTER (x);
}
static inline SCM
scm_from_keyword (struct scm_keyword *keyword)
{
return SCM_PACK_POINTER (keyword);
}
#define SCM_KEYWORDP(x) (scm_is_keyword (x))
#define SCM_VALIDATE_KEYWORD(pos, v) \
SCM_MAKE_VALIDATE_MSG (pos, v, KEYWORDP, "keyword")
#define SCM_I_KEYWORD_HASH(x) scm_i_symbol_hash (scm_to_keyword (x)->symbol)
SCM_INTERNAL void scm_init_keywords (void);
#endif /* SCM_KEYWORDS_INTERNAL_H */