diff options
author | Rob Browning <rlb@defaultvalue.org> | 2003-03-25 23:56:55 +0000 |
---|---|---|
committer | Rob Browning <rlb@defaultvalue.org> | 2003-03-25 23:56:55 +0000 |
commit | 60e7529ae4387ab60284e27ba5cc8612a479b5e9 (patch) | |
tree | 182e63f519fd8c3c445921d2d0d3de6869b72d4d /libguile/inline.h | |
parent | b11761f2ca9dfb83ba599670086ed60a3fe3ee54 (diff) | |
download | guile-60e7529ae4387ab60284e27ba5cc8612a479b5e9.tar.gz |
* inline.h: #include "libguile/__scm.h" at the top. Change code
to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
what to do instead of creating a new public #define. Rename usage
of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
USE_COPT_THREADS to SCM_USE_COPT_THREADS.
* inline.c: rearrange handling -- now we just #define
SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
"libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
appropriate, and we use that in inline.h along with the above
define to determine how to respond.
Diffstat (limited to 'libguile/inline.h')
-rw-r--r-- | libguile/inline.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/libguile/inline.h b/libguile/inline.h index 7d5b20dba..35c292712 100644 --- a/libguile/inline.h +++ b/libguile/inline.h @@ -49,10 +49,10 @@ "inline.c". */ +#include "libguile/__scm.h" #if (SCM_DEBUG_CELL_ACCESSES == 1) #include <stdio.h> - #endif #include "libguile/pairs.h" @@ -64,18 +64,21 @@ SCM_API SCM scm_cell (scm_t_bits car, scm_t_bits cdr); SCM_API SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr, scm_t_bits ccr, scm_t_bits cdr); -#ifdef HAVE_INLINE -#ifndef EXTERN_INLINE -#define EXTERN_INLINE extern inline -#endif + +#if defined SCM_C_INLINE || defined SCM_INLINE_C_INCLUDING_INLINE_H +/* either inlining, or being included from inline.c. We use (and + repeat) this long #if test here and below so that we don't have to + introduce any extraneous symbols into the public namespace. We + only need SCM_C_INLINE to be seen publically . */ extern unsigned scm_newcell2_count; extern unsigned scm_newcell_count; - - -EXTERN_INLINE +#if defined SCM_C_INLINE && ! defined SCM_INLINE_C_INCLUDING_INLINE_H +/* definitely inlining */ +extern SCM_C_INLINE +#endif SCM scm_cell (scm_t_bits car, scm_t_bits cdr) { @@ -146,7 +149,7 @@ scm_cell (scm_t_bits car, scm_t_bits cdr) SCM_GC_SET_CELL_WORD (z, 0, car); #if 0 /*fixme* Hmm... let's consider this later. */ -#if !defined(USE_COOP_THREADS) && !defined(USE_NULL_THREADS) && !defined(USE_COPT_THREADS) +#if !defined(SCM_USE_COOP_THREADS) && !defined(SCM_USE_NULL_THREADS) && !defined(SCM_USE_COPT_THREADS) /* When we are using preemtive threads, we might need to make sure that the initial values for the slots are protected until the cell is completely initialized. @@ -164,7 +167,10 @@ scm_cell (scm_t_bits car, scm_t_bits cdr) return z; } -EXTERN_INLINE +#if defined SCM_C_INLINE && ! defined SCM_INLINE_C_INCLUDING_INLINE_H +/* definitely inlining */ +extern SCM_C_INLINE +#endif SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr, scm_t_bits ccr, scm_t_bits cdr) @@ -194,7 +200,7 @@ scm_double_cell (scm_t_bits car, scm_t_bits cbr, SCM_GC_SET_CELL_WORD (z, 0, car); #if 0 /*fixme* Hmm... let's consider this later. */ -#if !defined(USE_COOP_THREADS) && !defined(USE_NULL_THREADS) && !defined(USE_COPT_THREADS) +#if !defined(SCM_USE_COOP_THREADS) && !defined(SCM_USE_NULL_THREADS) && !defined(SCM_USE_COPT_THREADS) /* When we are using non-cooperating threads, we might need to make sure that the initial values for the slots are protected until the cell is completely initialized. |