summaryrefslogtreecommitdiff
path: root/Examples/test-suite/wrapmacro.i
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2009-08-04 09:32:12 +0000
committerMiklos Vajna <vmiklos@frugalware.org>2009-08-04 09:32:12 +0000
commit88a934d7f035f4c5201bf4bb383e5001f7885aa6 (patch)
tree3ffa9174f7ef64eae6e3a9061f294fc1ee394e0d /Examples/test-suite/wrapmacro.i
parent31ad548c6ba5305ec4054440bfd18a80ab2a8255 (diff)
downloadswig-88a934d7f035f4c5201bf4bb383e5001f7885aa6.tar.gz
PHP: fix for the wrapmacro testcase
'max' is a built-in function in PHP, so let's rename it to 'maximum' instead. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11495 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/wrapmacro.i')
-rw-r--r--Examples/test-suite/wrapmacro.i7
1 files changed, 4 insertions, 3 deletions
diff --git a/Examples/test-suite/wrapmacro.i b/Examples/test-suite/wrapmacro.i
index 5353e7706..bd5e48b15 100644
--- a/Examples/test-suite/wrapmacro.i
+++ b/Examples/test-suite/wrapmacro.i
@@ -21,7 +21,8 @@ typedef unsigned short guint16;
(guint16) ((guint16) (val) >> 8) | \
(guint16) ((guint16) (val) << 8)))
-#define max(a,b) ((a) > (b) ? (a) : (b))
+/* Don't use max(), it's a builtin function for PHP. */
+#define maximum(a,b) ((a) > (b) ? (a) : (b))
%}
@@ -41,8 +42,8 @@ type SWIGMACRO_##name(lparams) {
/* Here, wrapping the macros */
%wrapmacro(guint16, GUINT16_SWAP_LE_BE_CONSTANT, guint16 val, val);
-%wrapmacro(size_t, max, PLIST(size_t a, const size_t& b), PLIST(a, b));
-%wrapmacro(double, max, PLIST(double a, double b), PLIST(a, b));
+%wrapmacro(size_t, maximum, PLIST(size_t a, const size_t& b), PLIST(a, b));
+%wrapmacro(double, maximum, PLIST(double a, double b), PLIST(a, b));
/* Maybe in the future, a swig directive will make this easier: