From a91d1b5a4286e7fdf307ec8d21a248eb63a57a33 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 27 May 2016 18:55:16 +0100 Subject: [PATCH] Remove unused kwnames generated variable in Ruby wrappers This seems to be from some left over Python kwargs / unfinished kwargs support --- CHANGES | 2 +- Source/Modules/octave.cxx | 1 - Source/Modules/ruby.cxx | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 198230775..d2b53d40b 100644 --- a/CHANGES +++ b/CHANGES @@ -587,7 +587,7 @@ Version 3.0.3 (30 Dec 2014) 2014-10-21: wsfulton Fix issue #242 - Use of the "kwargs" feature no longer automatically turns on the "compactdefaultargs" feature if the target language does not support kwargs. - Only Java and Python support kwargs, so this affects all the other languages. + Only Java and Ruby support kwargs, so this affects all the other languages. *** POTENTIAL INCOMPATIBILITY *** diff --git a/Source/Modules/octave.cxx b/Source/Modules/octave.cxx index 37cfeee64..b977609a8 100644 --- a/Source/Modules/octave.cxx +++ b/Source/Modules/octave.cxx @@ -469,7 +469,6 @@ public: value = Getattr(p, "tmap:doc:value"); } - // Note: the generated name should be consistent with that in kwnames[] name = name ? name : Getattr(p, "name"); name = name ? name : Getattr(p, "lname"); name = Swig_name_make(p, 0, name, 0, 0); // rename parameter if a keyword diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx index 275366977..2a3128472 100644 --- a/Source/Modules/ruby.cxx +++ b/Source/Modules/ruby.cxx @@ -1546,7 +1546,8 @@ public: /* Finish argument marshalling */ Printf(kwargs, " NULL }"); if (allow_kwargs) { - Printv(f->locals, tab4, "const char *kwnames[] = ", kwargs, ";\n", NIL); +// kwarg support not implemented +// Printv(f->locals, tab4, "const char *kwnames[] = ", kwargs, ";\n", NIL); } /* Trailing varargs */ @@ -3473,6 +3474,7 @@ public: *--------------------------------------------------------------------*/ bool kwargsSupport() const { + // kwargs support isn't actually implemented, but changing to return false may break something now as it turns on compactdefaultargs return true; } }; /* class RUBY */