diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-01-30 22:05:21 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-01-30 23:29:30 +0100 |
commit | 690a0112e55823aa8b862daeddcf44cea97e7917 (patch) | |
tree | c6e932883a187dde5aab178f6b523a61ca07b085 | |
parent | 1f4f7674bc352be9c5bdce0e0fb346345b04fa81 (diff) | |
download | guile-690a0112e55823aa8b862daeddcf44cea97e7917.tar.gz |
Remove the "has finalizer?" bit from pointer objects.
* libguile/foreign.h (SCM_POINTER_HAS_FINALIZER): Remove.
* libguile/foreign.c (scm_from_pointer): Store nothing more than
`scm_tc7_pointer' in the type slot.
-rw-r--r-- | libguile/foreign.c | 5 | ||||
-rw-r--r-- | libguile/foreign.h | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/libguile/foreign.c b/libguile/foreign.c index 47579af0b..2402ad1f6 100644 --- a/libguile/foreign.c +++ b/libguile/foreign.c @@ -133,10 +133,7 @@ scm_from_pointer (void *ptr, scm_t_pointer_finalizer finalizer) ret = null_pointer; else { - scm_t_bits type; - - type = scm_tc7_pointer | (finalizer ? (1 << 16UL) : 0UL); - ret = scm_cell (type, (scm_t_bits) ptr); + ret = scm_cell (scm_tc7_pointer, (scm_t_bits) ptr); if (finalizer) { diff --git a/libguile/foreign.h b/libguile/foreign.h index e534d48cb..825b1af7d 100644 --- a/libguile/foreign.h +++ b/libguile/foreign.h @@ -1,7 +1,7 @@ #ifndef SCM_FOREIGN_H #define SCM_FOREIGN_H -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2011 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 License @@ -55,8 +55,6 @@ typedef void (*scm_t_pointer_finalizer) (void *); SCM_MAKE_VALIDATE (pos, x, POINTER_P) #define SCM_POINTER_VALUE(x) \ ((void *) SCM_CELL_WORD_1 (x)) -#define SCM_POINTER_HAS_FINALIZER(x) \ - ((SCM_CELL_WORD_0 (x) >> 16) & 0x1) SCM_API SCM scm_from_pointer (void *, scm_t_pointer_finalizer); |