From 1a3e316c32562aec2665a0233d46d5635f9c1245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 10 Feb 2020 00:10:10 +0100 Subject: [PATCH] Remove traces of 'scm_memory_error'. 'scm_memory_error' was deprecated in 2014 in commit c2247b782a9234bb9aedee5204c30daf1d01a510 and removed in 2017 in commit c248ea10beb2afa4c113dbc6dc707bed5dbfc92e. This is a followup. * libguile/error.h (SCM_MEMORY_ERROR): Remove. * doc/guile-api.alist: Remove 'scm_memory_error'. * doc/ref/api-control.texi (Handling Errors): Likewise. (Dynamic Wind): Use 'scm_misc_error' instead of 'scm_memory_error'. --- doc/guile-api.alist | 1 - doc/ref/api-control.texi | 3 +-- libguile/error.h | 4 +--- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/doc/guile-api.alist b/doc/guile-api.alist index 78d3a5cd0..a1616149f 100644 --- a/doc/guile-api.alist +++ b/doc/guile-api.alist @@ -2263,7 +2263,6 @@ (scm_memoized_environment (groups scm C) (scan-data T)) (scm_memoized_p (groups scm C) (scan-data T)) (scm_memory_alloc_key (groups scm C) (scan-data B)) -(scm_memory_error (groups scm C) (scan-data T)) (scm_memq (groups scm C) (scan-data T)) (scm_memv (groups scm C) (scan-data T)) (scm_merge (groups scm C) (scan-data T)) diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index f603e32e3..25ae85bf3 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -1669,7 +1669,7 @@ scm_foo (SCM s1, SCM s2) c_res = foo (c_s1, c_s2); if (c_res == NULL) - scm_memory_error ("foo"); + scm_misc_error ("foo", "out of memory!", SCM_EOL); scm_dynwind_end (); @@ -2288,7 +2288,6 @@ and the call to these routines doesn't change @code{errno}. @deftypefnx {C Function} void scm_wrong_num_args (SCM @var{proc}) @deftypefnx {C Function} void scm_wrong_type_arg (char *@var{subr}, int @var{argnum}, SCM @var{bad_value}) @deftypefnx {C Function} void scm_wrong_type_arg_msg (char *@var{subr}, int @var{argnum}, SCM @var{bad_value}, const char *@var{expected}) -@deftypefnx {C Function} void scm_memory_error (char *@var{subr}) @deftypefnx {C Function} void scm_misc_error (const char *@var{subr}, const char *@var{message}, SCM @var{args}) Throw an error with the various keys described above. diff --git a/libguile/error.h b/libguile/error.h index cd134e650..7fb1ecf84 100644 --- a/libguile/error.h +++ b/libguile/error.h @@ -1,7 +1,7 @@ #ifndef SCM_ERROR_H #define SCM_ERROR_H -/* Copyright 1995-1998,2000-2002,2006,2008,2011,2014,2018 +/* Copyright 1995-1998,2000-2002,2006,2008,2011,2014,2018,2020 Free Software Foundation, Inc. This file is part of Guile. @@ -111,8 +111,6 @@ SCM_INTERNAL void scm_init_error (void); #define SCM_SYSERROR do { scm_syserror (FUNC_NAME); } while (0) -#define SCM_MEMORY_ERROR do { scm_memory_error (FUNC_NAME); } while (0) - #define SCM_SYSERROR_MSG(str, args, val) \ do { scm_syserror_msg (FUNC_NAME, (str), (args), (val)); } while (0)