1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-05 15:10:27 +02:00

Use `SCM_SNAME ()' when requesting the name of a subr.

* libguile/gsubr.c (create_gsubr, create_gsubr_with_generic):
  Use `SCM_SNAME ()' instead of `SCM_SUBR_ENTRY (subr).name'.

* libguile/procs.c (scm_c_define_subr_with_generic, scm_makcclo):
  Likewise.
  (scm_c_make_subr_with_generic): Same with `SCM_SUBR_GENERIC ()'.
This commit is contained in:
Ludovic Courtès 2009-01-20 21:24:41 +01:00
parent 5bec288a67
commit a62fad3a22
2 changed files with 7 additions and 7 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -75,13 +75,13 @@ create_gsubr (int define, const char *name,
subr = scm_c_make_subr (name, scm_tc7_lsubr_2, fcn); subr = scm_c_make_subr (name, scm_tc7_lsubr_2, fcn);
create_subr: create_subr:
if (define) if (define)
scm_define (SCM_SUBR_ENTRY(subr).name, subr); scm_define (SCM_SNAME (subr), subr);
return subr; return subr;
default: default:
{ {
SCM cclo = scm_makcclo (scm_f_gsubr_apply, 3L); SCM cclo = scm_makcclo (scm_f_gsubr_apply, 3L);
SCM subr = scm_c_make_subr (name, scm_tc7_subr_0, fcn); SCM subr = scm_c_make_subr (name, scm_tc7_subr_0, fcn);
SCM sym = SCM_SUBR_ENTRY(subr).name; SCM sym = SCM_SNAME (subr);
if (SCM_GSUBR_MAX < req + opt + rst) if (SCM_GSUBR_MAX < req + opt + rst)
{ {
fprintf (stderr, fprintf (stderr,
@ -151,7 +151,7 @@ create_gsubr_with_generic (int define,
subr = scm_c_make_subr_with_generic (name, scm_tc7_lsubr_2, fcn, gf); subr = scm_c_make_subr_with_generic (name, scm_tc7_lsubr_2, fcn, gf);
create_subr: create_subr:
if (define) if (define)
scm_define (SCM_SUBR_ENTRY(subr).name, subr); scm_define (SCM_SNAME (subr), subr);
return subr; return subr;
default: default:
; ;

View file

@ -83,7 +83,7 @@ SCM
scm_c_define_subr (const char *name, long type, SCM (*fcn) ()) scm_c_define_subr (const char *name, long type, SCM (*fcn) ())
{ {
SCM subr = scm_c_make_subr (name, type, fcn); SCM subr = scm_c_make_subr (name, type, fcn);
scm_define (SCM_SUBR_ENTRY(subr).name, subr); scm_define (SCM_SNAME (subr), subr);
return subr; return subr;
} }
@ -92,7 +92,7 @@ scm_c_make_subr_with_generic (const char *name,
long type, SCM (*fcn) (), SCM *gf) long type, SCM (*fcn) (), SCM *gf)
{ {
SCM subr = scm_c_make_subr (name, type, fcn); SCM subr = scm_c_make_subr (name, type, fcn);
SCM_SUBR_ENTRY(subr).generic = gf; SCM_SUBR_GENERIC (subr) = gf;
return subr; return subr;
} }
@ -101,7 +101,7 @@ scm_c_define_subr_with_generic (const char *name,
long type, SCM (*fcn) (), SCM *gf) long type, SCM (*fcn) (), SCM *gf)
{ {
SCM subr = scm_c_make_subr_with_generic (name, type, fcn, gf); SCM subr = scm_c_make_subr_with_generic (name, type, fcn, gf);
scm_define (SCM_SUBR_ENTRY(subr).name, subr); scm_define (SCM_SNAME (subr), subr);
return subr; return subr;
} }