summaryrefslogtreecommitdiff
path: root/Examples/test-suite/default_arg_values.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2015-05-27 20:51:20 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2015-05-27 20:55:56 +0100
commit986a13f1a06518375f8dff3e37da72d2a518d6e2 (patch)
tree04cc559d83ed5b5d01b7b74c83c25febff68ef63 /Examples/test-suite/default_arg_values.i
parent0a70498591c3589724415a2a7649da96571b9553 (diff)
downloadswig-986a13f1a06518375f8dff3e37da72d2a518d6e2.tar.gz
Fix Python typedef bool default arguments that are not booleans.
Includes code optimisation in PYTHON::convertValue(). Closes #327
Diffstat (limited to 'Examples/test-suite/default_arg_values.i')
-rw-r--r--Examples/test-suite/default_arg_values.i8
1 files changed, 8 insertions, 0 deletions
diff --git a/Examples/test-suite/default_arg_values.i b/Examples/test-suite/default_arg_values.i
index ca82d1af4..f2fc57c9b 100644
--- a/Examples/test-suite/default_arg_values.i
+++ b/Examples/test-suite/default_arg_values.i
@@ -8,6 +8,10 @@ struct Display {
float draw2(float *v = 0) { return v ? *v : 0; }
bool bool0(bool x = 0) { return x; }
bool bool1(bool x = 1) { return x; }
+
+ typedef bool mybool;
+ bool mybool0(mybool x = 0) { return x; }
+ bool mybool1(mybool x = 1) { return x; }
};
float* createPtr(float v) { static float val; val = v; return &val; }
%}
@@ -18,5 +22,9 @@ struct Display {
float draw2(float *v = NULL) { return v ? *v : 0; }
bool bool0(bool x = 0) { return x; }
bool bool1(bool x = 1) { return x; }
+
+ typedef bool mybool;
+ bool mybool0(mybool x = 0) { return x; }
+ bool mybool1(mybool x = 1) { return x; }
};
float* createPtr(float v) { static float val; val = v; return &val; }