use one line macro when possible
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8770 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
91462765db
commit
799f7e9254
2 changed files with 3 additions and 9 deletions
|
|
@ -52,9 +52,7 @@
|
|||
/* Complete overload of the output/constant/exception macros */
|
||||
|
||||
/* output */
|
||||
%define %set_output(obj)
|
||||
$result = obj;
|
||||
argvi++ %enddef
|
||||
%define %set_output(obj) $result = obj; argvi++ %enddef
|
||||
|
||||
/* append output */
|
||||
%define %append_output(obj)
|
||||
|
|
@ -75,9 +73,7 @@
|
|||
%end_block %enddef
|
||||
|
||||
/* raise exception */
|
||||
%define %raise(obj, type, desc)
|
||||
sv_setsv(GvSV(PL_errgv), obj);
|
||||
SWIG_fail %enddef
|
||||
%define %raise(obj, type, desc) sv_setsv(GvSV(PL_errgv), obj); SWIG_fail %enddef
|
||||
|
||||
/* Include the unified typemap library */
|
||||
%include <typemaps/swigtypemaps.swg>
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@
|
|||
#define SWIG_SetConstant(name, obj) rb_define_const($module, name, obj)
|
||||
|
||||
/* raise */
|
||||
%define SWIG_Raise(obj, type, desc)
|
||||
VALUE exc = SWIG_Ruby_ExceptionType(desc, obj);
|
||||
rb_exc_raise(exc)%enddef
|
||||
#define SWIG_Raise(obj, type, desc) rb_exc_raise(SWIG_Ruby_ExceptionType(desc, obj))
|
||||
|
||||
/* Include the unified typemap library */
|
||||
%include <typemaps/swigtypemaps.swg>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue