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