static SCM
c_handler (void *d, SCM tag, SCM args)
{
- struct c_data *data;
-
- /* Print a message. Note that if TAG is `quit', this will exit() the
- process. */
- scm_handle_by_message_noexit (NULL, tag, args);
-
- data = (struct c_data *)d;
+ struct c_data *data = (struct c_data *)d;
data->result = NULL;
return SCM_UNSPECIFIED;
}
c_data.data = data;
scm_i_with_continuation_barrier (c_body, &c_data,
c_handler, &c_data,
- NULL, NULL);
+ scm_handle_by_message_noexit, NULL);
return c_data.result;
}
static SCM
scm_handler (void *d, SCM tag, SCM args)
{
- /* Print a message. Note that if TAG is `quit', this will exit() the
- process. */
- scm_handle_by_message_noexit (NULL, tag, args);
-
return SCM_BOOL_F;
}
scm_data.proc = proc;
return scm_i_with_continuation_barrier (scm_body, &scm_data,
scm_handler, &scm_data,
- NULL, NULL);
+ scm_handle_by_message_noexit, NULL);
}
#undef FUNC_NAME
;;;; -*- scheme -*-
;;;; continuations.test --- test suite for continutations
;;;;
-;;;; Copyright (C) 2003, 2006, 2009, 2011 Free Software Foundation, Inc.
+;;;; Copyright (C) 2003, 2006, 2009 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
(error "Catch me if you can!")))))))))
handled))
- (pass-if "exit unwinds dynwinds inside a continuation barrier"
- (let ((s (with-error-to-string
- (lambda ()
- (with-continuation-barrier
- (lambda ()
- (dynamic-wind
- (lambda () #f)
- (lambda () (exit 1))
- (lambda () (throw 'abcde)))))))))
- (and (string-contains s "abcde") #t)))
-
(with-debugging-evaluator
(pass-if "make a stack from a continuation"