[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SCM_ASSERT_TYPE
From: |
Han-Wen Nienhuys |
Subject: |
SCM_ASSERT_TYPE |
Date: |
Wed, 2 Jul 2003 18:16:36 +0200 |
The expansion of SCM_ASSERT_TYPE includes an if statement, which will
lead to unexpected effects for code like
if (optional != SCM_UNDEFINED)
SCM_ASSERT_TYPE(optional, ... );
else
optional = default_value;
I've fixed this by adding else to the macro, i.e.
#define SCM_ASSERT_TYPE(_cond, _arg, _pos, _subr, _msg) \
if (!(_cond)) \
scm_wrong_type_arg_msg(_subr, _pos, _arg, _msg); else
are there any other macros in GUILE that expand to if statements?
--
Han-Wen Nienhuys | address@hidden | http://www.xs4all.nl/~hanwen
- SCM_ASSERT_TYPE,
Han-Wen Nienhuys <=