mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 04:30:19 +02:00
* macros.c (scm_make_synt): Use scm_make_subr_opt to make the
transformer subr. (Thanks to Bill Schottstaedt.)
This commit is contained in:
parent
1e08802b50
commit
26cfa3befe
1 changed files with 2 additions and 8 deletions
|
@ -146,14 +146,8 @@ SCM
|
||||||
scm_make_synt (const char *name, SCM (*macroizer) (), SCM (*fcn)() )
|
scm_make_synt (const char *name, SCM (*macroizer) (), SCM (*fcn)() )
|
||||||
{
|
{
|
||||||
SCM symcell = scm_sysintern (name, SCM_UNDEFINED);
|
SCM symcell = scm_sysintern (name, SCM_UNDEFINED);
|
||||||
long tmp = ((((SCM_CELLPTR) (SCM_CAR (symcell))) - scm_heap_org) << 8);
|
SCM transformer = scm_make_subr_opt (name, scm_tc7_subr_2, fcn, 0);
|
||||||
register SCM z;
|
SCM_SETCDR (symcell, macroizer (transformer));
|
||||||
if ((tmp >> 8) != ((SCM_CELLPTR) (SCM_CAR (symcell)) - scm_heap_org))
|
|
||||||
tmp = 0;
|
|
||||||
SCM_NEWCELL (z);
|
|
||||||
SCM_SUBRF (z) = fcn;
|
|
||||||
SCM_SETCAR (z, tmp + scm_tc7_subr_2);
|
|
||||||
SCM_SETCDR (symcell, macroizer (z));
|
|
||||||
return SCM_CAR (symcell);
|
return SCM_CAR (symcell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue