mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
* objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
casts its result, so doesn't yield an lvalue per ANSI C. * goops.c (s_scm_sys_set_object_setter_x): use SCM_SET_ENTITY_SETTER. (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE. * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts its result, so doesn't yield an lvalue per ANSI C. (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS. (SCM_GC_CLR_CARD_FLAGS): redefined in terms of SCM_GC_SET_CARD_FLAGS. (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto. * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
This commit is contained in:
parent
60d02d0914
commit
322ec19d3c
5 changed files with 35 additions and 7 deletions
|
@ -1366,7 +1366,7 @@ SCM_DEFINE (scm_sys_set_object_setter_x, "%set-object-setter!", 2, 0, 0,
|
|||
SCM_ARG1,
|
||||
FUNC_NAME);
|
||||
if (SCM_I_ENTITYP (obj))
|
||||
SCM_ENTITY_SETTER (obj) = setter;
|
||||
SCM_SET_ENTITY_SETTER (obj, setter);
|
||||
else
|
||||
SCM_OPERATOR_CLASS (obj)->setter = setter;
|
||||
return SCM_UNSPECIFIED;
|
||||
|
@ -1545,7 +1545,8 @@ scm_make_method_cache (SCM gf)
|
|||
static void
|
||||
clear_method_cache (SCM gf)
|
||||
{
|
||||
SCM_ENTITY_PROCEDURE (gf) = scm_make_method_cache (gf);
|
||||
SCM cache = scm_make_method_cache (gf);
|
||||
SCM_SET_ENTITY_PROCEDURE (gf, cache);
|
||||
SCM_SLOT (gf, scm_si_used_by) = SCM_BOOL_F;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue