Add a SWIG_contract_assert macro.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5379 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
85b94c7502
commit
ec54de8592
2 changed files with 12 additions and 1 deletions
|
|
@ -30,6 +30,12 @@ extern "C" {
|
||||||
#define SWIG_Guile_MarkPointerNoncollectable(s) (s)
|
#define SWIG_Guile_MarkPointerNoncollectable(s) (s)
|
||||||
#define SWIG_Guile_MarkPointerDestroyed(s) (s)
|
#define SWIG_Guile_MarkPointerDestroyed(s) (s)
|
||||||
|
|
||||||
|
#define SWIG_contract_assert(expr, msg) \
|
||||||
|
if (!(expr)) \
|
||||||
|
scm_error(gh_symbol2scm("swig-contract-assertion-failed"), \
|
||||||
|
(char *) FUNC_NAME, (char *) msg, \
|
||||||
|
SCM_EOL, SCM_BOOL_F); else
|
||||||
|
|
||||||
#if defined(SWIG_NOINCLUDE)
|
#if defined(SWIG_NOINCLUDE)
|
||||||
# define SWIGSTATIC
|
# define SWIGSTATIC
|
||||||
#elif defined(SWIG_GLOBAL)
|
#elif defined(SWIG_GLOBAL)
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ typedef struct swig_guile_clientdata {
|
||||||
SWIG_Guile_NewPointerObj((void*)ptr, type, owner)
|
SWIG_Guile_NewPointerObj((void*)ptr, type, owner)
|
||||||
#define SWIG_PropagateClientData(type) \
|
#define SWIG_PropagateClientData(type) \
|
||||||
SWIG_Guile_PropagateClientData(type)
|
SWIG_Guile_PropagateClientData(type)
|
||||||
|
#define SWIG_contract_assert(expr, msg) \
|
||||||
|
if (!(expr)) \
|
||||||
|
scm_error(scm_str2symbol("swig-contract-assertion-failed"), \
|
||||||
|
(char *) FUNC_NAME, (char *) msg, \
|
||||||
|
SCM_EOL, SCM_BOOL_F); else
|
||||||
|
|
||||||
#ifdef SWIG_NOINCLUDE
|
#ifdef SWIG_NOINCLUDE
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue