swig/Examples/test-suite/keyword_rename.i
Vadim Zeitlin cb426b1074 Enable keyword arguments for keyword_rename unit test
This is required for the recently added Python test checking that an
argument clashing with a Python keyword is also renamed when using
keyword arguments and fixes this test failure when using -builtin Python
option.
2019-01-17 01:25:43 +01:00

42 lines
542 B
OpenEdge ABL

/*
* Test reserved keyword renaming
*/
%module keyword_rename
%feature("kwargs");
#pragma SWIG nowarn=SWIGWARN_PARSE_KEYWORD
%inline %{
#define KW(x, y) int x (int y) { return y; }
/* Python keywords */
KW(in, except)
KW(except, in)
KW(pass, in)
/* Perl keywords */
KW(tie, die)
KW(use, next)
/* Java keywords */
KW(implements, native)
KW(synchronized, final)
/* C# Keywords */
KW(string, out)
struct sealed {int i;};
/* Go Keywords */
KW(go, defer)
KW(chan, fallthrough)
/* Lua keywords */
KW(end, function)
KW(nil,local)
%}