Experimental contract work.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4807 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
de0ac1f10b
commit
91048279ba
1 changed files with 6 additions and 0 deletions
|
|
@ -405,6 +405,12 @@ SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
|||
|
||||
#endif
|
||||
|
||||
/* Contract support */
|
||||
|
||||
#define SWIG_preassert(x) if (!(x)) { PyErr_SetString(PyExc_RuntimeError, "preassertion failure: " #x); goto fail; } else
|
||||
#define SWIG_postassert(x) if (!(x)) { PyErr_SetString(PyExc_RuntimeError, "postassertion failure: " #x); goto fail; } else
|
||||
#define SWIG_invarassert(x) if (!(x)) { PyErr_SetString(PyExc_RuntimeError, "invariant failure: " #x); goto fail; } else
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue