Add a SWIG_contract_assert macro.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5379 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a0c9c690e4
commit
894d9cc4e9
2 changed files with 12 additions and 1 deletions
|
|
@ -30,6 +30,12 @@ extern "C" {
|
|||
#define SWIG_Guile_MarkPointerNoncollectable(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)
|
||||
# define SWIGSTATIC
|
||||
#elif defined(SWIG_GLOBAL)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,12 @@ typedef struct swig_guile_clientdata {
|
|||
SWIG_Guile_NewPointerObj((void*)ptr, type, owner)
|
||||
#define SWIG_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
|
||||
|
||||
/* Interface helper function */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue