#ifndef SCM_INLINE_H
#define SCM_INLINE_H
-/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#if defined SCM_C_INLINE && ! defined SCM_INLINE_C_INCLUDING_INLINE_H
/* definitely inlining */
-extern SCM_C_INLINE
+#ifdef __GNUC__
+extern
+#else
+static
+#endif
+SCM_C_INLINE
#endif
SCM
scm_cell (scm_t_bits car, scm_t_bits cdr)
SCM z;
/* We retrieve the SCM pointer only once since the call to
SCM_FREELIST_LOC will be slightly expensive when we support
- preemptive multithreading. SCM_FREELIST_DOC will then retrieve
+ preemptive multithreading. SCM_FREELIST_LOC will then retrieve
the thread specific freelist.
Until then, SCM_FREELIST_DOC expands to (&scm_i_freelist) and the
*/
SCM *freelist = SCM_FREELIST_LOC (scm_i_freelist);
- if (SCM_NULLP (*freelist))
+ if (scm_gc_running_p)
+ {
+ abort();
+ }
+
+ if (scm_is_null (*freelist))
z = scm_gc_for_newcell (&scm_i_master_freelist, freelist);
else
{
fprintf(stderr, "scm_cell tried to allocate a marked cell.\n");
abort();
}
- else if (SCM_GC_CELL_TYPE(z) != scm_tc_free_cell)
+ else if (SCM_GC_CELL_WORD(z, 0) != scm_tc_free_cell)
{
fprintf(stderr, "cell from freelist is not a free cell.\n");
abort();
#if defined SCM_C_INLINE && ! defined SCM_INLINE_C_INCLUDING_INLINE_H
/* definitely inlining */
-extern SCM_C_INLINE
+#ifdef __GNUC__
+extern
+#else
+static
+#endif
+SCM_C_INLINE
#endif
SCM
scm_double_cell (scm_t_bits car, scm_t_bits cbr,
SCM z;
SCM *freelist = SCM_FREELIST_LOC (scm_i_freelist2);
- if (SCM_NULLP (*freelist))
+ if (scm_gc_running_p)
+ {
+ abort();
+ }
+
+ if (scm_is_null (*freelist))
z = scm_gc_for_newcell (&scm_i_master_freelist2, freelist);
else
{