diff --git a/Lib/chicken/chickenkw.swg b/Lib/chicken/chickenkw.swg index b164a2e77..a0e1591fb 100644 --- a/Lib/chicken/chickenkw.swg +++ b/Lib/chicken/chickenkw.swg @@ -3,28 +3,29 @@ /* Warnings for certain CHICKEN keywords. From Section 7.1.1 of Revised^5 Report on the Algorithmic Language Scheme */ -#define CHICKW(x) %namewarn("314:" #x " is a R^5RS syntatic keyword") #x +#define CHICKENKW(x) %namewarn("314:" #x " is a R^5RS syntatic keyword") #x -CHICKW(else); -CHICKW(=>); -CHICKW(define); -CHICKW(unquote); -CHICKW(unquote-splicing); -CHICKW(quote); -CHICKW(lambda); -CHICKW(if); -CHICKW(set!); -CHICKW(begin); -CHICKW(cond); -CHICKW(and); -CHICKW(or); -CHICKW(case); -CHICKW(let); -CHICKW(let*); -CHICKW(letrec); -CHICKW(do); -CHICKW(delay); -CHICKW(quasiquote); +CHICKENKW(else); +CHICKENKW(=>); +CHICKENKW(define); +CHICKENKW(unquote); +CHICKENKW(unquote-splicing); +CHICKENKW(quote); +CHICKENKW(lambda); +CHICKENKW(if); +CHICKENKW(set!); +CHICKENKW(begin); +CHICKENKW(cond); +CHICKENKW(and); +CHICKENKW(or); +CHICKENKW(case); +CHICKENKW(let); +CHICKENKW(let*); +CHICKENKW(letrec); +CHICKENKW(do); +CHICKENKW(delay); +CHICKENKW(quasiquote); +#undef CHICKENKW #endif //__chicken_chickenkw_swg__ diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg index 6c3a23c66..cba4de0a2 100644 --- a/Lib/csharp/csharp.swg +++ b/Lib/csharp/csharp.swg @@ -467,3 +467,6 @@ using System.Runtime.InteropServices; %apply long { size_t }; +/* csharp keywords */ +/* please test and activate */ +//%include "csharpkw.swg" diff --git a/Lib/csharp/csharpkw.swg b/Lib/csharp/csharpkw.swg index dd0e1b1df..720abd10d 100644 --- a/Lib/csharp/csharpkw.swg +++ b/Lib/csharp/csharpkw.swg @@ -87,7 +87,10 @@ CSHARPKW(void); CSHARPKW(volatile); CSHARPKW(while); + /* swig seems to managing this one right */ // CSHARPKW(string); +#undef CSHARPKW + #endif //__csharp_csharpkw_swg__ diff --git a/Lib/java/javakw.swg b/Lib/java/javakw.swg index 5a5c1cbef..02121d7fb 100644 --- a/Lib/java/javakw.swg +++ b/Lib/java/javakw.swg @@ -61,7 +61,10 @@ JAVAKW(while); /* others bad names */ -// Not really sure about this, but sometimes it produce problems +/* Not really sure about this, but sometimes it produce problems */ // %namewarn("314:clone is a java reserved method name") *::clone; + +#undef JAVAKW + #endif //__java_javakw_swg__ diff --git a/Lib/php4/phpkw.swg b/Lib/php4/php4kw.swg similarity index 98% rename from Lib/php4/phpkw.swg rename to Lib/php4/php4kw.swg index ee2bcca95..55bd111ca 100644 --- a/Lib/php4/phpkw.swg +++ b/Lib/php4/php4kw.swg @@ -86,4 +86,7 @@ PHPKW(xor); // This is conflicting with _std_deque.i!. PHPKW(empty); + +#undef PHPKW + #endif //__php_phpkw_swg__ diff --git a/Lib/pike/pikekw.swg b/Lib/pike/pikekw.swg index 1bcfbb61b..09ea0d6b4 100644 --- a/Lib/pike/pikekw.swg +++ b/Lib/pike/pikekw.swg @@ -51,4 +51,6 @@ PIKEKW(while); // Swig manages this one right // PIKEKW(string); +#undef PIKEKW + #endif //__pike_pikekw_swg__ diff --git a/Lib/python/pythonkw.swg b/Lib/python/pythonkw.swg index c8e95574d..c327b028d 100644 --- a/Lib/python/pythonkw.swg +++ b/Lib/python/pythonkw.swg @@ -2,36 +2,67 @@ #define __python_pythonkw_swg__ /* Warnings for Python keywords */ -#define PYKW(x) %namewarn("314:" #x " is a python keyword") #x +#define PYTHONKW(x) %namewarn("314:" #x " is a python keyword") #x -PYKW(and); -PYKW(assert); -PYKW(break); -PYKW(class); -PYKW(continue); -PYKW(def); -PYKW(del); -PYKW(elif); -PYKW(else); -PYKW(except); -PYKW(exec); -PYKW(finally); -PYKW(for); -PYKW(from); -PYKW(global); -PYKW(if); -PYKW(import); -PYKW(in); -PYKW(is); -PYKW(lambda); -PYKW(not); -PYKW(or); -PYKW(pass); -PYKW(print); -PYKW(raise); -PYKW(return); -PYKW(try); -PYKW(while); +PYTHONKW(and); +PYTHONKW(assert); +PYTHONKW(break); +PYTHONKW(class); +PYTHONKW(continue); +PYTHONKW(def); +PYTHONKW(del); +PYTHONKW(elif); +PYTHONKW(else); +PYTHONKW(except); +PYTHONKW(exec); +PYTHONKW(finally); +PYTHONKW(for); +PYTHONKW(from); +PYTHONKW(global); +PYTHONKW(if); +PYTHONKW(import); +PYTHONKW(in); +PYTHONKW(is); +PYTHONKW(lambda); +PYTHONKW(not); +PYTHONKW(or); +PYTHONKW(pass); +PYTHONKW(print); +PYTHONKW(raise); +PYTHONKW(return); +PYTHONKW(try); +PYTHONKW(while); +PYTHONKW(yield); +#undef PYTHONKW + +/* + bad names + http://users.ox.ac.uk/~sann1276/python/handbook/node52.html +*/ + +#define PYTHONBN(x) %namewarn("314:" #x " is a bad name in python") #x + +PYTHONBN(Data); +PYTHONBN(Float); +PYTHONBN(Int); +PYTHONBN(Numeric); +PYTHONBN(Oxphys); +PYTHONBN(array); +PYTHONBN(close); +PYTHONBN(float); +PYTHONBN(int); +PYTHONBN(input); +PYTHONBN(open); +PYTHONBN(range); +PYTHONBN(type); +PYTHONBN(write); +PYTHONBN(zeros); + + +PYTHONBN(True); +PYTHONBN(False); + +#undef PYTHONBN #endif //__python_pythonkw_swg__ diff --git a/Lib/ruby/rubykw.swg b/Lib/ruby/rubykw.swg index fd4f0f542..8d4b15250 100644 --- a/Lib/ruby/rubykw.swg +++ b/Lib/ruby/rubykw.swg @@ -53,4 +53,6 @@ RUBYKW(until); /* swig doesn't like this one */ // RUBYKW(defined); +#undef RUBYKW + #endif //__ruby_rubykw_swg__ diff --git a/Lib/tcl/tclkw.swg b/Lib/tcl/tcl8kw.swg similarity index 100% rename from Lib/tcl/tclkw.swg rename to Lib/tcl/tcl8kw.swg