guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] branch master updated: Reintroduce 'SCM_MEMORY_ERROR' in


From: Ludovic Courtès
Subject: [Guile-commits] branch master updated: Reintroduce 'SCM_MEMORY_ERROR' in terms of 'scm_report_out_of_memory'.
Date: Wed, 12 Feb 2020 05:45:45 -0500

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guile.

The following commit(s) were added to refs/heads/master by this push:
     new 41d470f  Reintroduce 'SCM_MEMORY_ERROR' in terms of 
'scm_report_out_of_memory'.
41d470f is described below

commit 41d470f0e96875e1e08a72da8478341b5fa70532
Author: Ludovic Courtès <address@hidden>
AuthorDate: Tue Feb 11 14:47:16 2020 +0100

    Reintroduce 'SCM_MEMORY_ERROR' in terms of 'scm_report_out_of_memory'.
    
    Suggested by Dale P. Smith <address@hidden>.
    
    * libguile/deprecated.h (SCM_MEMORY_ERROR): New macro.
    * doc/ref/api-control.texi (Dynamic Wind): Use 'scm_report_out_of_memory'.
---
 doc/ref/api-control.texi | 2 +-
 libguile/deprecated.h    | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi
index 25ae85b..b62c0d6 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_misc_error ("foo", "out of memory!", SCM_EOL);
+    scm_report_out_of_memory ();
 
   scm_dynwind_end ();
 
diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index 543d1b8..ba249da 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -1,7 +1,7 @@
 #ifndef SCM_DEPRECATED_H
 #define SCM_DEPRECATED_H
 
-/* Copyright 2003-2007,2009-2018
+/* Copyright 2003-2007,2009-2018,2020
      Free Software Foundation, Inc.
 
    This file is part of Guile.
@@ -111,6 +111,8 @@ typedef ptrdiff_t scm_t_ptrdiff SCM_DEPRECATED_TYPE;
 typedef struct scm_thread scm_i_thread SCM_DEPRECATED_TYPE;
 #undef SCM_DEPRECATED_TYPE
 
+#define SCM_MEMORY_ERROR do { scm_report_out_of_memory (); } while (0)
+
 SCM_DEPRECATED char* scm_find_executable (const char *name);
 
 void scm_i_init_deprecated (void);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]