simplify generated code and more consistent names/sections
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8781 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
082f050258
commit
a3555839e4
4 changed files with 126 additions and 108 deletions
|
|
@ -21,8 +21,7 @@
|
|||
|
||||
%define_as(SWIG_exception_fail(code, msg), %block(%error(code, msg); SWIG_fail))
|
||||
|
||||
%define_as(SWIG_contract_assert(expr, msg),
|
||||
if (!(expr)) { %error(SWIG_RuntimeError, msg); SWIG_fail; } else)
|
||||
%define_as(SWIG_contract_assert(expr, msg), if (!(expr)) { %error(SWIG_RuntimeError, msg); SWIG_fail; } else)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
#ifndef %raise
|
||||
#if defined(SWIG_Raise)
|
||||
/* simple raise operation */
|
||||
#define %raise(obj, type, desc) %error_block(SWIG_Raise(obj, type, desc); SWIG_fail)
|
||||
#define %raise(obj, type, desc) SWIG_Raise(obj, type, desc); SWIG_fail
|
||||
#else
|
||||
#error "Language must define SWIG_Raise or %raise"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue