swig/Examples/test-suite/keyword_rename.i
William S Fulton 34e663a61a Test a different C# keyword rename
Worked around warning in java jdk-15:
  warning: 'sealed' may become a restricted type name in a future release
  and may be unusable for type declarations or as the element type of an array

Adding sealed to the list of automatically renamed keywords in Java does
not seem prudent.
2021-03-20 09:49:30 +00:00

42 lines
546 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 stackalloc {int i;};
/* Go Keywords */
KW(go, defer)
KW(chan, fallthrough)
/* Lua keywords */
KW(end, function)
KW(nil,local)
%}