Fix Python typedef bool default arguments that are not booleans.
Includes code optimisation in PYTHON::convertValue(). Closes #327
This commit is contained in:
parent
0a70498591
commit
986a13f1a0
4 changed files with 29 additions and 19 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue