comments, clean and cosmetics
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8782 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a3555839e4
commit
18d7ad613b
4 changed files with 15 additions and 10 deletions
|
|
@ -55,20 +55,15 @@
|
|||
%define %set_output(obj) $result = obj; argvi++ %enddef
|
||||
|
||||
/* append output */
|
||||
%define %append_output(obj)
|
||||
if (argvi >= items) {
|
||||
EXTEND(sp,1);
|
||||
}
|
||||
%set_output(obj) %enddef
|
||||
%define %append_output(obj) if (argvi >= items) EXTEND(sp,1); %set_output(obj) %enddef
|
||||
|
||||
/* variable output */
|
||||
%define %set_varoutput(obj) sv_setsv($result,obj) %enddef
|
||||
|
||||
/* constant */
|
||||
%define %set_constant(name, obj) %begin_block
|
||||
SV *_obj = obj;
|
||||
SV *sv = get_sv((char*) SWIG_prefix name, TRUE | 0x2);
|
||||
sv_setsv(sv, _obj);
|
||||
sv_setsv(sv, obj);
|
||||
SvREADONLY_on(sv);
|
||||
%end_block %enddef
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ SWIGINTERN VALUE SWIG_AUX_##Method##(VALUE *args)
|
|||
*res = Action;
|
||||
return obj;
|
||||
}
|
||||
|
||||
%enddef
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,12 @@
|
|||
#define SWIG_Object VALUE
|
||||
#define VOID_Object Qnil
|
||||
|
||||
/* Simple overload of the output/constant/exception handling */
|
||||
/* Overload of the output/constant/exception handling */
|
||||
|
||||
/* append output */
|
||||
#define SWIG_AppendOutput(result,obj) SWIG_Ruby_AppendOutput(result, obj)
|
||||
|
||||
/* set constant */
|
||||
#define SWIG_SetConstant(name, obj) rb_define_const($module, name, obj)
|
||||
|
||||
/* raise */
|
||||
|
|
|
|||
|
|
@ -41,11 +41,18 @@
|
|||
/* Tcl types */
|
||||
#define SWIG_Object Tcl_Obj *
|
||||
|
||||
/* Simple overload of the output/constant/exception handling */
|
||||
/* Overload of the output/constant/exception handling */
|
||||
|
||||
/* output */
|
||||
#define %set_output(obj) Tcl_SetObjResult(interp,obj)
|
||||
|
||||
/* append output */
|
||||
#define %append_output(obj) Tcl_ListObjAppendElement(interp,Tcl_GetObjResult(interp),obj)
|
||||
|
||||
/* set constant */
|
||||
#define SWIG_SetConstant(name, obj) SWIG_Tcl_SetConstantObj(interp, name, obj)
|
||||
|
||||
/* raise */
|
||||
#define SWIG_Raise(obj,type,desc) SWIG_Tcl_SetErrorObj(interp,type,obj)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue