mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
more care regarding SCM_PACK and SCM_UNPACK
* libguile/control.c (reify_partial_continuation): * libguile/eval.c (RETURN_BOOT_CLOSURE): * libguile/frames.c (scm_frame_num_locals, scm_frame_local_ref) (scm_frame_local_set_x) * libguile/frames.h (SCM_FRAME_SET_RETURN_ADDRESS): (SCM_FRAME_SET_MV_RETURN_ADDRESS, SCM_FRAME_SET_DYNAMIC_LINK): * libguile/goops.c (scm_class_of, scm_primitive_generic_generic) (scm_c_extend_primitive_generic, compute_getters_n_setters) (scm_sys_initialize_object): * libguile/guardians.c (finalize_guarded): * libguile/list.c (SCM_I_CONS): * libguile/macros.c (scm_i_make_primitive_macro) (scm_make_syntax_transformer): * libguile/memoize.c (MAKMEMO, SCM_MAKE_MEMOIZER) (SCM_MAKE_REST_MEMOIZER): * libguile/modules.c (scm_module_reverse_lookup) * libguile/print.c (iprin1): * libguile/promises.c (scm_make_promise) * libguile/srcprop.c (scm_make_srcprops): * libguile/vectors.c (scm_c_vector_ref): * libguile/vm-engine.c (vm_engine) * libguile/vm-i-scheme.c (REL, add1, sub1): * libguile/vm-i-system.c (new_frame, call_cc) * libguile/weaks.h (SCM_WEAK_PAIR_WORD_DELETED_P): Be more careful about SCM_PACK / SCM_UNPACK.
This commit is contained in:
parent
d223c3fcdd
commit
b2b33168b1
18 changed files with 75 additions and 72 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2009, 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
|
||||
|
@ -213,7 +213,7 @@ scm_c_vector_ref (SCM v, size_t k)
|
|||
scm_out_of_range (NULL, scm_from_size_t (k));
|
||||
elt = (SCM_I_VECTOR_ELTS(v))[k];
|
||||
|
||||
if ((elt == SCM_PACK (NULL)) && SCM_I_WVECTP (v))
|
||||
if (SCM_UNPACK (elt) == 0 && SCM_I_WVECTP (v))
|
||||
/* ELT was a weak pointer and got nullified by the GC. */
|
||||
return SCM_BOOL_F;
|
||||
|
||||
|
@ -232,7 +232,7 @@ scm_c_vector_ref (SCM v, size_t k)
|
|||
k = SCM_I_ARRAY_BASE (v) + k*dim->inc;
|
||||
elt = (SCM_I_VECTOR_ELTS (vv))[k];
|
||||
|
||||
if ((elt == SCM_PACK (NULL)) && (SCM_I_WVECTP (vv)))
|
||||
if (SCM_UNPACK (elt) == 0 && (SCM_I_WVECTP (vv)))
|
||||
/* ELT was a weak pointer and got nullified by the GC. */
|
||||
return SCM_BOOL_F;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue