From 0479fc63c47cdaacf9b668e1cf385ae6f3b67ce2 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Thu, 13 Nov 2003 16:59:53 +0000 Subject: [PATCH] Simplified contract API git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5318 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/python/pyrun.swg | 10 +--------- SWIG/Lib/tcl/swigtcl8.swg | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/SWIG/Lib/python/pyrun.swg b/SWIG/Lib/python/pyrun.swg index cbadfc148..a03203419 100644 --- a/SWIG/Lib/python/pyrun.swg +++ b/SWIG/Lib/python/pyrun.swg @@ -442,15 +442,7 @@ SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { /* Contract support */ -#define SWIG_preassert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else -#define SWIG_postassert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else - -#define SWIG_inherit_preassert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else -#define SWIG_inherit_postassert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else - -#define SWIG_invariant(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else -#define SWIG_invariant_begin(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else -#define SWIG_invariant_end(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else +#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else #ifdef __cplusplus } diff --git a/SWIG/Lib/tcl/swigtcl8.swg b/SWIG/Lib/tcl/swigtcl8.swg index a5f4d4283..d1ad3d649 100644 --- a/SWIG/Lib/tcl/swigtcl8.swg +++ b/SWIG/Lib/tcl/swigtcl8.swg @@ -798,15 +798,7 @@ typedef struct { /* Contract support */ -#define SWIG_preassert(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg #expr, TCL_STATIC ); goto fail; } else -#define SWIG_postassert(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg #expr, TCL_STATIC ); goto fail; } else - -#define SWIG_inherit_preassert(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg #expr, TCL_STATIC ); goto fail; } else -#define SWIG_inherit_postassert(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg #expr, TCL_STATIC ); goto fail; } else - -#define SWIG_invariant(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg #expr, TCL_STATIC ); goto fail; } else -#define SWIG_invariant_begin(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg #expr, TCL_STATIC ); goto fail; } else -#define SWIG_invariant_end(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg #expr, TCL_STATIC ); goto fail; } else +#define SWIG_contract_assert(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg #expr, TCL_STATIC ); goto fail; } else #ifdef __cplusplus }