summaryrefslogtreecommitdiff
path: root/libguile/procs.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-08-17 23:39:56 +0200
committerLudovic Courtès <ludo@gnu.org>2009-08-18 00:06:45 +0200
commitfbb857a472eb4e69c1cba05e86646b7004f32df6 (patch)
treeff23e64de5a558b575ed812349d8af6e64d8ceb4 /libguile/procs.c
parent49c9839eae84f7f3cd10db45f389fa1ea1050659 (diff)
parente33a910dd0f430f34c32fe6846899aee33fc2cf6 (diff)
downloadguile-fbb857a472eb4e69c1cba05e86646b7004f32df6.tar.gz
Merge branch 'master' into boehm-demers-weiser-gc
Conflicts: lib/Makefile.am libguile/Makefile.am libguile/frames.c libguile/gc-card.c libguile/gc-freelist.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc_os_dep.c libguile/load.c libguile/macros.c libguile/objcodes.c libguile/programs.c libguile/strings.c libguile/vm.c m4/gnulib-cache.m4 m4/gnulib-comp.m4 m4/inline.m4
Diffstat (limited to 'libguile/procs.c')
-rw-r--r--libguile/procs.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/libguile/procs.c b/libguile/procs.c
index c695668e2..b67bfd90b 100644
--- a/libguile/procs.c
+++ b/libguile/procs.c
@@ -1,18 +1,19 @@
/* Copyright (C) 1995,1996,1997,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
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
*/
@@ -45,15 +46,19 @@ SCM
scm_c_make_subr (const char *name, long type, SCM (*fcn) ())
{
register SCM z;
+ SCM sname;
SCM *meta_info;
meta_info = scm_gc_malloc (2 * sizeof (*meta_info), "subr meta-info");
- meta_info[0] = scm_from_locale_symbol (name);
+ sname = scm_from_locale_symbol (name);
+ meta_info[0] = sname;
meta_info[1] = SCM_EOL; /* properties */
z = scm_double_cell ((scm_t_bits) type, (scm_t_bits) fcn,
0 /* generic */, (scm_t_bits) meta_info);
+ scm_remember_upto_here_1 (sname);
+
return z;
}
@@ -61,7 +66,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_SNAME (subr), subr);
+ scm_define (SCM_SUBR_NAME (subr), subr);
return subr;
}
@@ -79,7 +84,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_SNAME (subr), subr);
+ scm_define (SCM_SUBR_NAME (subr), subr);
return subr;
}
@@ -223,7 +228,7 @@ SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0,
lookup */
switch (SCM_TYP7 (procedure)) {
case scm_tcs_subrs:
- name = SCM_SNAME (procedure);
+ name = SCM_SUBR_NAME (procedure);
break;
default:
name = scm_procedure_property (procedure, scm_sym_name);