contract support - patch from Hans Oesterholt-Dijkema
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7292 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a2039dea5d
commit
48f6a95092
1 changed files with 8 additions and 0 deletions
|
|
@ -23,6 +23,14 @@ extern "C" {
|
|||
#define SWIG_MustGetPtr(s, type, argnum, flags) \
|
||||
SWIG_MzScheme_MustGetPtr(s, type, argnum, flags, FUNC_NAME, argc, argv)
|
||||
|
||||
#define SWIG_contract_assert(expr,msg) \
|
||||
if (!(expr)) { \
|
||||
char *m=(char *) scheme_malloc(strlen(msg)+1000); \
|
||||
sprintf(m,"SWIG contract, assertion failed: function=%s, message=%s", \
|
||||
(char *) FUNC_NAME,(char *) msg); \
|
||||
scheme_signal_error(m); \
|
||||
}
|
||||
|
||||
/* Runtime API */
|
||||
#define SWIG_GetModule(clientdata) SWIG_MzScheme_GetModule((Scheme_Env *)(clientdata))
|
||||
#define SWIG_SetModule(clientdata, pointer) SWIG_MzScheme_SetModule((Scheme_Env *) (clientdata), pointer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue