From cce8b2ce93703aff953750fb40cb53176ea66504 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 20 Jan 2009 21:24:41 +0100 Subject: [PATCH] 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 ()'. --- libguile/gsubr.c | 8 ++++---- libguile/procs.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libguile/gsubr.c b/libguile/gsubr.c index be5c34271..fdb70ed92 100644 --- a/libguile/gsubr.c +++ b/libguile/gsubr.c @@ -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 * 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); create_subr: if (define) - scm_define (SCM_SUBR_ENTRY(subr).name, subr); + scm_define (SCM_SNAME (subr), subr); return subr; default: { SCM cclo = scm_makcclo (scm_f_gsubr_apply, 3L); 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) { 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); create_subr: if (define) - scm_define (SCM_SUBR_ENTRY(subr).name, subr); + scm_define (SCM_SNAME (subr), subr); return subr; default: ; diff --git a/libguile/procs.c b/libguile/procs.c index 5541671e3..acd7e4663 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -78,7 +78,7 @@ SCM scm_c_define_subr (const char *name, long type, SCM (*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; } @@ -99,7 +99,7 @@ scm_c_make_subr_with_generic (const char *name, long type, SCM (*fcn) (), SCM *gf) { SCM subr = scm_c_make_subr (name, type, fcn); - SCM_SUBR_ENTRY(subr).generic = gf; + SCM_SUBR_GENERIC (subr) = gf; return subr; } @@ -108,7 +108,7 @@ scm_c_define_subr_with_generic (const char *name, long type, SCM (*fcn) (), SCM *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; } -- 2.20.1