summaryrefslogtreecommitdiff
path: root/libguile/backtrace.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-01-08 16:37:22 +0100
committerAndy Wingo <wingo@pobox.com>2012-01-08 16:37:22 +0100
commitfb2be758b76ea0ede398ed9a7f559d96d806c50e (patch)
tree4147ae12433f4b392778bc83c4d284c05435b183 /libguile/backtrace.c
parent20c360b298dd9d29d0b1a6301f43ff6da4968908 (diff)
downloadguile-fb2be758b76ea0ede398ed9a7f559d96d806c50e.tar.gz
allow scm_display_error to use a stack as the first argument
* libguile/backtrace.c (scm_display_error): Allow a deprecated use of this function to pass a stack as the first argument. Thanks to Peter Brett for pointing it out, in http://lists.gnu.org/archive/html/guile-user/2011-06/msg00000.html.
Diffstat (limited to 'libguile/backtrace.c')
-rw-r--r--libguile/backtrace.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index db22c17e9..7dd66ad2e 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -144,6 +144,19 @@ SCM_DEFINE (scm_display_error, "display-error", 6, 0, 0,
{
SCM_VALIDATE_OUTPUT_PORT (2, port);
+#if SCM_ENABLE_DEPRECATED
+ if (SCM_STACKP (frame))
+ {
+ scm_c_issue_deprecation_warning
+ ("Passing a stack as the first argument to `scm_display_error' is "
+ "deprecated. Pass a frame instead.");
+ if (SCM_STACK_LENGTH (frame))
+ frame = scm_stack_ref (frame, SCM_INUM0);
+ else
+ frame = SCM_BOOL_F;
+ }
+#endif
+
scm_i_display_error (frame, port, subr, message, args, rest);
return SCM_UNSPECIFIED;