inline.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* classes: h_files */
  2. #ifndef SCM_INLINE_H
  3. #define SCM_INLINE_H
  4. /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010,
  5. * 2011, 2012, 2013 Free Software Foundation, Inc.
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public License
  9. * as published by the Free Software Foundation; either version 3 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. */
  22. /* This file is for inline functions. On platforms that don't support
  23. inlining functions, they are turned into ordinary functions. On
  24. platforms that do support inline functions, the definitions are still
  25. compiled into the library, once, in inline.c. */
  26. #include "libguile/__scm.h"
  27. #include "libguile/gc.h"
  28. #include "libguile/threads.h"
  29. #include "libguile/array-handle.h"
  30. #include "libguile/ports.h"
  31. #include "libguile/numbers.h"
  32. #include "libguile/error.h"
  33. SCM_INLINE int scm_is_string (SCM x);
  34. SCM_INLINE SCM scm_cell (scm_t_bits car, scm_t_bits cdr);
  35. SCM_INLINE SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr,
  36. scm_t_bits ccr, scm_t_bits cdr);
  37. SCM_INLINE SCM scm_words (scm_t_bits car, scm_t_uint32 n_words);
  38. #if SCM_CAN_INLINE || defined SCM_INLINE_C_IMPLEMENTING_INLINES
  39. /* Either inlining, or being included from inline.c. */
  40. SCM_INLINE_IMPLEMENTATION int
  41. scm_is_string (SCM x)
  42. {
  43. return SCM_HAS_TYP7 (x, scm_tc7_string);
  44. }
  45. #endif
  46. #endif