From 4a182a930a474aa0d537da8dce861783b96c6dda 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/SWIG@5318 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/pyrun.swg | 10 +--------- Lib/tcl/swigtcl8.swg | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index cbadfc148..a03203419 100644 --- a/Lib/python/pyrun.swg +++ b/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/Lib/tcl/swigtcl8.swg b/Lib/tcl/swigtcl8.swg index a5f4d4283..d1ad3d649 100644 --- a/Lib/tcl/swigtcl8.swg +++ b/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 }