diff options
author | Andy Wingo <wingo@pobox.com> | 2018-06-20 08:38:32 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-06-20 08:38:32 +0200 |
commit | cedab6e2856db466159b9861963a50d72cbd71d8 (patch) | |
tree | d40efbccd3eeb90841fc33085ccc1fec1d15e818 | |
parent | d3cfabd89b1ba8d5d0516ad711ef9e433dac9aa0 (diff) | |
download | guile-cedab6e2856db466159b9861963a50d72cbd71d8.tar.gz |
Move scm_tc7_pointer snarfer out to foreign.h
* libguile/snarf.h:
* libguile/foreign.h (SCM_IMMUTABLE_POINTER): Move here, from snarf.h.
-rw-r--r-- | libguile/foreign.h | 4 | ||||
-rw-r--r-- | libguile/snarf.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libguile/foreign.h b/libguile/foreign.h index 3e0312b51..b78f29d5b 100644 --- a/libguile/foreign.h +++ b/libguile/foreign.h @@ -21,6 +21,7 @@ #include "libguile/__scm.h" #include "libguile/gc.h" +#include "libguile/snarf.h" /* A "foreign pointer" is a wrapped C pointer. It is represented by a cell whose second word is a pointer. The first word has the @@ -55,6 +56,9 @@ typedef void (*scm_t_pointer_finalizer) (void *); #define SCM_POINTER_VALUE(x) \ ((void *) SCM_CELL_WORD_1 (x)) +#define SCM_IMMUTABLE_POINTER(c_name, ptr) \ + SCM_IMMUTABLE_CELL (c_name, scm_tc7_pointer, ptr) + SCM_API void *scm_to_pointer (SCM pointer); SCM_API SCM scm_from_pointer (void *, scm_t_pointer_finalizer); diff --git a/libguile/snarf.h b/libguile/snarf.h index e20ac6488..3ef17c12e 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -326,9 +326,6 @@ SCM_SNARF_INIT(scm_set_smob_apply((tag), (c_name), (req), (opt), (rest));) (scm_t_bits) 0, \ (scm_t_bits) (sizeof (contents) - 1)) -#define SCM_IMMUTABLE_POINTER(c_name, ptr) \ - SCM_IMMUTABLE_CELL (c_name, scm_tc7_pointer, ptr) - #endif /* SCM_SUPPORT_STATIC_ALLOCATION */ |