1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-04 08:40:21 +02:00

scm_gc_object_address pins its referent

* libguile/gc.h:
* libguile/gc.c (scm_gc_pin_object): New function.
(scm_gc_object_address): New function, to be used instead of SCM_UNPACK
when an object's address is exposed, for example via hashq.
* libguile/atomic.c:
* libguile/cache-internal.h:
* libguile/continuations.c:
* libguile/dynstack.c:
* libguile/dynstack.h:
* libguile/ephemerons.c:
* libguile/exceptions.c:
* libguile/finalizers.c:
* libguile/fluids-internal.h:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/frames.c:
* libguile/hash.c:
* libguile/hashtab.c:
* libguile/intrinsics.c:
* libguile/memoize.c:
* libguile/print.c:
* libguile/programs.c:
* libguile/smob.c:
* libguile/struct.c:
* libguile/struct.h:
* libguile/variable.c:
* libguile/vm.c: Use the new functions everywhere that is needed.
Because they take a thread, sometimes we have to do some extra plumbing.
This commit is contained in:
Andy Wingo 2025-06-26 15:00:22 +02:00
parent b0ce014801
commit a7d7ff5019
25 changed files with 133 additions and 117 deletions

View file

@ -99,7 +99,7 @@ do_push_fluid (SCM fluid, SCM val)
{
scm_thread *thread = SCM_I_CURRENT_THREAD;
scm_dynstack_push_fluid (&thread->dynstack, fluid, val,
&thread->dynamic_state);
thread);
return SCM_UNSPECIFIED;
}
@ -107,7 +107,7 @@ static SCM
do_pop_fluid (void)
{
scm_thread *thread = SCM_I_CURRENT_THREAD;
scm_dynstack_unwind_fluid (&thread->dynstack, &thread->dynamic_state);
scm_dynstack_unwind_fluid (&thread->dynstack, thread);
return SCM_UNSPECIFIED;
}