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:
Marcelo Matus 2006-02-11 02:20:17 +00:00
commit 18d7ad613b
4 changed files with 15 additions and 10 deletions

View file

@ -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

View file

@ -22,7 +22,6 @@ SWIGINTERN VALUE SWIG_AUX_##Method##(VALUE *args)
*res = Action;
return obj;
}
%enddef

View file

@ -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 */

View file

@ -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)