mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
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.
This commit is contained in:
parent
1f4f7674bc
commit
690a0112e5
2 changed files with 2 additions and 7 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue