Remove unused kwnames generated variable in Ruby wrappers

This seems to be from some left over Python kwargs / unfinished kwargs support
This commit is contained in:
William S Fulton 2016-05-27 18:55:16 +01:00
parent 6725b2fdf6
commit a91d1b5a42
3 changed files with 4 additions and 3 deletions

View File

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

View File

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

View File

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