Rename python_kwargs testcase to kwargs_feature. Add kwargs_feature to Ruby and fix Ruby warnings when using kwargs feature. Add %kwargs macro for Ruby
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3cb76bb45e
commit
58e74e8675
6 changed files with 15 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
%module python_kwargs
|
%module kwargs_feature
|
||||||
|
|
||||||
%nocopyctor;
|
%nocopyctor;
|
||||||
%kwargs;
|
%kwargs;
|
||||||
|
|
@ -41,6 +41,7 @@ CPP_TEST_CASES += \
|
||||||
inout \
|
inout \
|
||||||
inplaceadd \
|
inplaceadd \
|
||||||
input \
|
input \
|
||||||
|
kwargs_feature \
|
||||||
li_cstring \
|
li_cstring \
|
||||||
li_cwstring \
|
li_cwstring \
|
||||||
li_factory \
|
li_factory \
|
||||||
|
|
@ -58,7 +59,6 @@ CPP_TEST_CASES += \
|
||||||
primitive_types \
|
primitive_types \
|
||||||
python_abstractbase \
|
python_abstractbase \
|
||||||
python_append \
|
python_append \
|
||||||
python_kwargs \
|
|
||||||
python_nondynamic \
|
python_nondynamic \
|
||||||
python_overload_simple_cast \
|
python_overload_simple_cast \
|
||||||
python_richcompare \
|
python_richcompare \
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from python_kwargs import *
|
from kwargs_feature import *
|
||||||
|
|
||||||
class MyFoo(Foo):
|
class MyFoo(Foo):
|
||||||
def __init__(self, a , b = 0):
|
def __init__(self, a , b = 0):
|
||||||
|
|
@ -10,6 +10,7 @@ top_srcdir = @top_srcdir@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
|
|
||||||
CPP_TEST_CASES = \
|
CPP_TEST_CASES = \
|
||||||
|
kwargs_feature \
|
||||||
li_cdata \
|
li_cdata \
|
||||||
li_cstring \
|
li_cstring \
|
||||||
li_factory \
|
li_factory \
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,13 @@
|
||||||
#define %nooutput %feature("outputs","0")
|
#define %nooutput %feature("outputs","0")
|
||||||
#define %initstack %feature("initstack", "1")
|
#define %initstack %feature("initstack", "1")
|
||||||
#define %ignorestack %feature("initstack", "0")
|
#define %ignorestack %feature("initstack", "0")
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------- */
|
||||||
|
/*
|
||||||
|
Enable keywords paramaters
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define %kwargs %feature("kwargs")
|
||||||
|
#define %nokwargs %feature("kwargs", "0")
|
||||||
|
#define %clearkwargs %feature("kwargs", "")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1477,7 +1477,7 @@ public:
|
||||||
/* Finish argument marshalling */
|
/* Finish argument marshalling */
|
||||||
Printf(kwargs, " NULL }");
|
Printf(kwargs, " NULL }");
|
||||||
if (allow_kwargs) {
|
if (allow_kwargs) {
|
||||||
Printv(f->locals, tab4, "char *kwnames[] = ", kwargs, ";\n", NIL);
|
Printv(f->locals, tab4, "const char *kwnames[] = ", kwargs, ";\n", NIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Trailing varargs */
|
/* Trailing varargs */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue