1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

SCM_ASSERT to error.h

* libguile/error.h (SCM_ASSERT, SCM_ASSERT_TYPE): Move definition here.
  Remove SCM_RECKLESS case.
* libguile/__scm.h: (From here.)
This commit is contained in:
Andy Wingo 2011-05-15 13:34:07 +02:00
parent cb5b7677a2
commit 6703caf726
2 changed files with 11 additions and 18 deletions

View file

@ -3,7 +3,7 @@
#ifndef SCM_ERROR_H
#define SCM_ERROR_H
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc.
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2006, 2008, 2011 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
@ -34,6 +34,16 @@ SCM_API SCM scm_arg_type_key;
SCM_API SCM scm_memory_alloc_key;
SCM_API SCM scm_misc_error_key;
#define SCM_ASSERT(_cond, _arg, _pos, _subr) \
do { if (SCM_UNLIKELY (!(_cond))) \
scm_wrong_type_arg (_subr, _pos, _arg); } while (0)
#define SCM_ASSERT_TYPE(_cond, _arg, _pos, _subr, _msg) \
do { if (SCM_UNLIKELY (!(_cond))) \
scm_wrong_type_arg_msg(_subr, _pos, _arg, _msg); } while (0)
SCM_API void scm_error (SCM key, const char *subr, const char *message,