From 3211840744a1c9567fea811904733cf5157ab612 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 26 Oct 2005 07:10:39 +0000 Subject: [PATCH] fix compiler warnings and finishing transition to the option git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7727 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/ruby.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SWIG/Source/Modules/ruby.cxx b/SWIG/Source/Modules/ruby.cxx index c5901a808..5f9ed7fb7 100644 --- a/SWIG/Source/Modules/ruby.cxx +++ b/SWIG/Source/Modules/ruby.cxx @@ -935,10 +935,12 @@ public: /* Are we tracking the type that is being returned * by this output parameter? */ - SwigType *pt = Getattr(p,"type"); - if (pt && trackType(pt)) { - setTrackObjectsFlagForNewPointer(tm); - } + SwigType *pt = Getattr(p,"type"); + if (trackType(pt)) { + Replaceall(tm, "$track","SWIG_TRACK_OBJECTS"); + } else { + Replaceall(tm, "$track","0"); + } Printv(outarg,tm,"\n",NIL); need_result = 1; @@ -993,6 +995,7 @@ public: } } +#if 0 /* --------------------------------------------------------------------- * setTrackObjectsFlagForConvertPtr() * @@ -1061,6 +1064,8 @@ public: } } +#endif + /* --------------------------------------------------------------------- * functionWrapper() * @@ -1159,7 +1164,7 @@ public: } else { Printf(f->code,"if (argc < %d) ", numreq-start); } - Printf(f->code,"{rb_raise(rb_eArgError, \"wrong # of arguments(%%d for %d)\",argc); return Qnil;}\n",numreq-start); + Printf(f->code,"{rb_raise(rb_eArgError, \"wrong # of arguments(%%d for %d)\",argc); SWIG_fail;}\n",numreq-start); } else { Printv(f->def, "SWIGINTERN VALUE\n", wname, "(int argc, VALUE *argv, VALUE self) {", NIL); if (!varargs) { @@ -1167,7 +1172,7 @@ public: } else { Printf(f->code,"if (argc < %d) ", numreq-start); } - Printf(f->code,"{rb_raise(rb_eArgError, \"wrong # of arguments(%%d for %d)\",argc); return Qnil;}\n",numreq-start); + Printf(f->code,"{rb_raise(rb_eArgError, \"wrong # of arguments(%%d for %d)\",argc); SWIG_fail;}\n",numreq-start); } /* Now walk the function parameter list and generate code */