diff options
author | Andy Wingo <wingo@pobox.com> | 2012-01-08 14:27:03 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-01-08 14:27:03 +0100 |
commit | 4f5fb3519471a7e1e520c3cc39e7853f4170349e (patch) | |
tree | 86cfe2ed8002eb1015bd08450d401610404d223a /libguile | |
parent | 729b62bd95c61b6e2992f823b469b76bdc483b0d (diff) | |
download | guile-4f5fb3519471a7e1e520c3cc39e7853f4170349e.tar.gz |
deprecate SCM_ASRTGO
* libguile/deprecated.h: Mark scm_immutable_cell and
scm_immutable_double_cell as being SCM_DEPRECATED, not SCM_API.
Deprecate SCM_ASRTGO.
* libguile/deprecated.c (scm_i_deprecated_asrtgo): New support
procedure.
* doc/ref/api-control.texi (Handling Errors): Remove ASRTGO docs.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/deprecated.c | 12 | ||||
-rw-r--r-- | libguile/deprecated.h | 14 |
2 files changed, 23 insertions, 3 deletions
diff --git a/libguile/deprecated.c b/libguile/deprecated.c index 4ba305e80..530d2d425 100644 --- a/libguile/deprecated.c +++ b/libguile/deprecated.c @@ -2624,6 +2624,18 @@ scm_immutable_double_cell (scm_t_bits car, scm_t_bits cbr, return scm_double_cell (car, cbr, ccr, cdr); } + + + +scm_t_bits +scm_i_deprecated_asrtgo (scm_t_bits condition) +{ + scm_c_issue_deprecation_warning + ("SCM_ASRTGO is deprecated. Use `if (!condition) goto label;' directly."); + + return condition; +} + diff --git a/libguile/deprecated.h b/libguile/deprecated.h index 82415ea2e..ed8134469 100644 --- a/libguile/deprecated.h +++ b/libguile/deprecated.h @@ -5,7 +5,7 @@ #ifndef SCM_DEPRECATED_H #define SCM_DEPRECATED_H -/* Copyright (C) 2003,2004, 2005, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2003,2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012 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 @@ -796,12 +796,20 @@ SCM_DEPRECATED SCM scm_struct_create_handle (SCM obj); /* Deprecated 26-05-2011, as the GC_STUBBORN API doesn't do anything any more. */ -SCM_API SCM scm_immutable_cell (scm_t_bits car, scm_t_bits cdr); -SCM_API SCM scm_immutable_double_cell (scm_t_bits car, scm_t_bits cbr, +SCM_DEPRECATED SCM scm_immutable_cell (scm_t_bits car, scm_t_bits cdr); +SCM_DEPRECATED SCM scm_immutable_double_cell (scm_t_bits car, scm_t_bits cbr, scm_t_bits ccr, scm_t_bits cdr); +SCM_DEPRECATED SCM scm_i_deprecated_asrtgo (scm_t_bits condition); + +/* Deprecated 08-01-2012, as it's undocumented and unused. */ +#define SCM_ASRTGO(_cond, _label) \ + do { if (!scm_i_deprecated_asrtgo(_cond)) goto _label; } while (0) + + + void scm_i_init_deprecated (void); #endif |