mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
* Removed deprecated hook names.
* Fix use of SCM_FLOBUFLEN.
This commit is contained in:
parent
7cfbc4f7b0
commit
56e55ac7cf
7 changed files with 39 additions and 58 deletions
6
RELEASE
6
RELEASE
|
@ -20,12 +20,6 @@ After signal handling and threading have been fixed:
|
|||
- Make sure that the deprecation mechanism explained in INSTALL and
|
||||
README is completed and works.
|
||||
|
||||
- Q: Was SCM_FLOBUFLEN only deprecated publically, or was it supposed
|
||||
to be removed from numbers.c as well?
|
||||
|
||||
- remove code related to the name property of hooks. Also, check init.c,
|
||||
since the dependency between hooks and objprop will then be eliminated.
|
||||
|
||||
=== In release 1.8.0:
|
||||
|
||||
- remove compatability module (ice-9 and-let*). It
|
||||
|
|
|
@ -1,10 +1,33 @@
|
|||
2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* gc.c (scm_init_gc): Added FIXME comment.
|
||||
|
||||
* hooks.c: Since hooks don't have a name any more, it is not
|
||||
necessary to include objprop.h.
|
||||
|
||||
(hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
|
||||
|
||||
(symbol_name, scm_make_hook_with_name): Removed.
|
||||
|
||||
(scm_create_hook): Don't set the hook's name property.
|
||||
|
||||
* hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
|
||||
|
||||
(SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
|
||||
|
||||
* init.c (scm_init_guile_1): Hooks don't use objprops any more.
|
||||
|
||||
* numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
|
||||
scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
|
||||
FLOBUFLEN and define it unconditionally.
|
||||
|
||||
2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
|
||||
|
||||
* gh_data.c (gh_lookup): Call gh_module_lookup with
|
||||
`scm_current_module ()', not `#f'.
|
||||
(gh_module_lookup): Expect a module instead of an obarray as first
|
||||
argument and do lookup in that module.
|
||||
|
||||
|
||||
* ramap.c (raeql_1): Do not call scm_uniform_vector_length on
|
||||
arrays. The length of array is already determined differently and
|
||||
scm_uniform_vector_length does not work on arrays.
|
||||
|
@ -17,7 +40,7 @@
|
|||
* __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
|
||||
they are not used. Changed `wrong type' error into `wrong num
|
||||
args' error. Changed all callers.
|
||||
|
||||
|
||||
* numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
|
||||
arguments are supplied.
|
||||
|
||||
|
|
|
@ -2699,6 +2699,7 @@ scm_init_gc ()
|
|||
scm_tc16_allocated = scm_make_smob_type ("allocated cell", 0);
|
||||
#endif /* SCM_DEBUG_CELL_ACCESSES == 1 */
|
||||
|
||||
/* Dirk:FIXME:: scm_create_hook is strange. */
|
||||
scm_after_gc_hook = scm_create_hook ("after-gc-hook", 0);
|
||||
|
||||
after_gc_thunk = scm_make_subr_opt ("%gc-thunk", scm_tc7_subr_0, gc_async_thunk, 0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -49,7 +49,6 @@
|
|||
|
||||
#include "libguile/eval.h"
|
||||
#include "libguile/ports.h"
|
||||
#include "libguile/objprop.h"
|
||||
#include "libguile/procprop.h"
|
||||
#include "libguile/root.h"
|
||||
#include "libguile/smob.h"
|
||||
|
@ -184,7 +183,7 @@ hook_print (SCM hook, SCM port, scm_print_state *pstate)
|
|||
{
|
||||
scm_putc (' ', port);
|
||||
name = scm_procedure_name (SCM_CAR (ls));
|
||||
if (SCM_NFALSEP (name))
|
||||
if (!SCM_FALSEP (name))
|
||||
scm_iprin1 (name, port, pstate);
|
||||
else
|
||||
scm_putc ('?', port);
|
||||
|
@ -195,37 +194,16 @@ hook_print (SCM hook, SCM port, scm_print_state *pstate)
|
|||
}
|
||||
|
||||
|
||||
SCM_SYMBOL (symbol_name, "name");
|
||||
|
||||
SCM
|
||||
scm_create_hook (const char* name, int n_args)
|
||||
{
|
||||
SCM hook = make_hook (SCM_MAKINUM (n_args), "scm_create_hook");
|
||||
scm_sysintern (name, hook);
|
||||
scm_set_object_property_x (hook, symbol_name, scm_makfrom0str (name));
|
||||
scm_protect_object (hook);
|
||||
return hook;
|
||||
}
|
||||
|
||||
|
||||
#if (SCM_DEBUG_DEPRECATED == 0)
|
||||
|
||||
SCM_DEFINE (scm_make_hook_with_name, "make-hook-with-name", 1, 1, 0,
|
||||
(SCM name, SCM n_args),
|
||||
"Create a named hook with the name @var{name} for storing\n"
|
||||
"procedures of arity @var{n_args}. @var{n_args} defaults to\n"
|
||||
"zero.")
|
||||
#define FUNC_NAME s_scm_make_hook_with_name
|
||||
{
|
||||
SCM hook = make_hook (n_args, FUNC_NAME);
|
||||
scm_set_object_property_x (hook, scm_makfrom0str ("name"), name);
|
||||
return hook;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
||||
|
||||
|
||||
SCM_DEFINE (scm_make_hook, "make-hook", 0, 1, 0,
|
||||
(SCM n_args),
|
||||
"Create a hook for storing procedure of arity\n"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* classes: h_files */
|
||||
|
||||
#ifndef HOOKSH
|
||||
#define HOOKSH
|
||||
/* Copyright (C) 1995, 1996, 1999, 2000 Free Software Foundation, Inc.
|
||||
#ifndef SCM_HOOKS_H
|
||||
#define SCM_HOOKS_H
|
||||
/* Copyright (C) 1995,1996,1999,2000,2001 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -115,17 +115,7 @@ extern void scm_c_run_hook (SCM hook, SCM args);
|
|||
extern SCM scm_hook_to_list (SCM hook);
|
||||
extern void scm_init_hooks (void);
|
||||
|
||||
|
||||
|
||||
#if (SCM_DEBUG_DEPRECATED == 0)
|
||||
|
||||
/* Use scm_set_object_property_x to set the name property of a hook: */
|
||||
#define SCM_HOOK_NAME(h) scm_object_property (h, scm_makfrom0str ("name"))
|
||||
extern SCM scm_make_hook_with_name (SCM name, SCM n_args);
|
||||
|
||||
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
||||
|
||||
#endif /* HOOKSH */
|
||||
#endif /* SCM_HOOKS_H */
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1997,1998,1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -508,7 +508,7 @@ scm_init_guile_1 (SCM_STACKITEM *base)
|
|||
scm_init_deprecation (); /* Requires hashtabs */
|
||||
scm_init_objprop ();
|
||||
scm_init_properties ();
|
||||
scm_init_hooks (); /* Requires objprop until hook names are removed */
|
||||
scm_init_hooks (); /* Requires smob_prehistory */
|
||||
scm_init_gc (); /* Requires hooks, async */
|
||||
#ifdef GUILE_ISELECT
|
||||
scm_init_iselect ();
|
||||
|
|
|
@ -68,15 +68,10 @@ static SCM scm_divbigint (SCM x, long z, int sgn, int mode);
|
|||
#define SCM_SWAP(x,y) do { SCM __t = x; x = y; y = __t; } while (0)
|
||||
|
||||
|
||||
/*#if (SCM_DEBUG_DEPRECATED == 1)*/ /* not defined in header yet? */
|
||||
#if 1
|
||||
|
||||
/* SCM_FLOBUFLEN is the maximum number of characters neccessary for the
|
||||
/* FLOBUFLEN is the maximum number of characters neccessary for the
|
||||
* printed or scm_string representation of an inexact number.
|
||||
*/
|
||||
#define SCM_FLOBUFLEN (10+2*(sizeof(double)/sizeof(char)*SCM_CHAR_BIT*3+9)/10)
|
||||
|
||||
#endif /* SCM_DEBUG_DEPRECATED == 1 */
|
||||
#define FLOBUFLEN (10+2*(sizeof(double)/sizeof(char)*SCM_CHAR_BIT*3+9)/10)
|
||||
|
||||
|
||||
/* IS_INF tests its floating point number for infiniteness
|
||||
|
@ -2307,7 +2302,7 @@ SCM_DEFINE (scm_number_to_string, "number->string", 1, 1, 0,
|
|||
} else if (SCM_BIGP (n)) {
|
||||
return big2str (n, (unsigned int) base);
|
||||
} else if (SCM_INEXACTP (n)) {
|
||||
char num_buf [SCM_FLOBUFLEN];
|
||||
char num_buf [FLOBUFLEN];
|
||||
return scm_makfromstr (num_buf, iflo2str (n, num_buf), 0);
|
||||
} else {
|
||||
SCM_WRONG_TYPE_ARG (1, n);
|
||||
|
@ -2322,7 +2317,7 @@ SCM_DEFINE (scm_number_to_string, "number->string", 1, 1, 0,
|
|||
int
|
||||
scm_print_real (SCM sexp, SCM port, scm_print_state *pstate)
|
||||
{
|
||||
char num_buf[SCM_FLOBUFLEN];
|
||||
char num_buf[FLOBUFLEN];
|
||||
scm_lfwrite (num_buf, iflo2str (sexp, num_buf), port);
|
||||
return !0;
|
||||
}
|
||||
|
@ -2330,7 +2325,7 @@ scm_print_real (SCM sexp, SCM port, scm_print_state *pstate)
|
|||
int
|
||||
scm_print_complex (SCM sexp, SCM port, scm_print_state *pstate)
|
||||
{
|
||||
char num_buf[SCM_FLOBUFLEN];
|
||||
char num_buf[FLOBUFLEN];
|
||||
scm_lfwrite (num_buf, iflo2str (sexp, num_buf), port);
|
||||
return !0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue