diff --git a/Examples/test-suite/csharp/overload_template_runme.cs b/Examples/test-suite/csharp/overload_template_runme.cs index e4910161b..e25420169 100644 --- a/Examples/test-suite/csharp/overload_template_runme.cs +++ b/Examples/test-suite/csharp/overload_template_runme.cs @@ -7,8 +7,8 @@ public class runme { int f = overload_template.foo(); - f += overload_template.max(3,4); - double b = overload_template.max(3.4,5.2); + f += overload_template.maximum(3,4); + double b = overload_template.maximum(3.4,5.2); b++; // warning suppression // mix 1 diff --git a/Examples/test-suite/java/overload_template_runme.java b/Examples/test-suite/java/overload_template_runme.java index e76bf63ee..bda1853be 100644 --- a/Examples/test-suite/java/overload_template_runme.java +++ b/Examples/test-suite/java/overload_template_runme.java @@ -16,8 +16,8 @@ public class overload_template_runme { public static void main(String argv[]) { int f = overload_template.foo(); - int a = overload_template.max(3,4); - double b = overload_template.max(3.4,5.2); + int a = overload_template.maximum(3,4); + double b = overload_template.maximum(3.4,5.2); // mix 1 if (overload_template.mix1("hi") != 101) diff --git a/Examples/test-suite/lua/overload_template_runme.lua b/Examples/test-suite/lua/overload_template_runme.lua index c62a42c02..19cc7e9dd 100644 --- a/Examples/test-suite/lua/overload_template_runme.lua +++ b/Examples/test-suite/lua/overload_template_runme.lua @@ -2,12 +2,12 @@ require("import") -- the import fn import("overload_template") -- import code for k,v in pairs(overload_template) do _G[k]=v end -- move to global --- lua has only one numeric type, so max(int,int) and max(double,double) are the same +-- lua has only one numeric type, so maximum(int,int) and maximum(double,double) are the same -- whichever one was wrapper first will be used (which is int) f = foo() -a = max(3,4) +a = maximum(3,4) -- mix 1 assert(mix1("hi") == 101) diff --git a/Examples/test-suite/octave/overload_template_runme.m b/Examples/test-suite/octave/overload_template_runme.m index b38dc73e1..d7b1cbb65 100644 --- a/Examples/test-suite/octave/overload_template_runme.m +++ b/Examples/test-suite/octave/overload_template_runme.m @@ -1,8 +1,8 @@ overload_template f = foo(); -a = max(3,4); -b = max(3.4,5.2); +a = maximum(3,4); +b = maximum(3.4,5.2); # mix 1 if (mix1("hi") != 101) diff --git a/Examples/test-suite/overload_template.i b/Examples/test-suite/overload_template.i index a889dbfda..dee6ab91e 100644 --- a/Examples/test-suite/overload_template.i +++ b/Examples/test-suite/overload_template.i @@ -3,7 +3,7 @@ #ifdef SWIGLUA // lua only has one numeric type, so most of the overloads shadow each other creating warnings %warnfilter(SWIGWARN_LANG_OVERLOAD_SHADOW) foo; -%warnfilter(SWIGWARN_LANG_OVERLOAD_SHADOW) max; +%warnfilter(SWIGWARN_LANG_OVERLOAD_SHADOW) maximum; %warnfilter(SWIGWARN_LANG_OVERLOAD_SHADOW) specialization; %warnfilter(SWIGWARN_LANG_OVERLOAD_SHADOW) overload; %warnfilter(SWIGWARN_LANG_OVERLOAD_SHADOW) space::nsoverload; @@ -11,12 +11,6 @@ %warnfilter(SWIGWARN_LANG_OVERLOAD_SHADOW) barT; #endif -%{ -#ifdef max -#undef max -#endif -%} - %inline %{ int foo() { @@ -29,15 +23,15 @@ template } template - T max(T a, T b) { return (a > b) ? a : b; } + T maximum(T a, T b) { return (a > b) ? a : b; } %} %template(foo) foo; %template(foo) foo; -%template(max) max; -%template(max) max; +%template(maximum) maximum; +%template(maximum) maximum; // Mix template overloading with plain function overload // Mix 1 diff --git a/Examples/test-suite/python/overload_template_runme.py b/Examples/test-suite/python/overload_template_runme.py index 3fd77f339..c1337ba6a 100644 --- a/Examples/test-suite/python/overload_template_runme.py +++ b/Examples/test-suite/python/overload_template_runme.py @@ -1,8 +1,8 @@ from overload_template import * f = foo() -a = max(3,4) -b = max(3.4,5.2) +a = maximum(3,4) +b = maximum(3.4,5.2) # mix 1 if (mix1("hi") != 101): diff --git a/Examples/test-suite/ruby/overload_template_runme.rb b/Examples/test-suite/ruby/overload_template_runme.rb index bcbddf512..b099fd3ea 100755 --- a/Examples/test-suite/ruby/overload_template_runme.rb +++ b/Examples/test-suite/ruby/overload_template_runme.rb @@ -13,5 +13,5 @@ require 'overload_template' f = Overload_template.foo() -a = Overload_template.max(3,4) -b = Overload_template.max(3.4,5.2) +a = Overload_template.maximum(3,4) +b = Overload_template.maximum(3.4,5.2)