summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2013-01-29 07:28:32 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2013-01-29 07:31:11 +0000
commitd172e3d0ed96e1f242ebaa4066f556a8abe0e764 (patch)
tree8260f85fb1e7c9fac8ffe9f0594a6340d5a0d9c6
parent38f37ef5ae7026dd7c04ac8c39cb2aec4bf90838 (diff)
downloadswig-d172e3d0ed96e1f242ebaa4066f556a8abe0e764.tar.gz
Apply patch SF #334 - Fix Python default value conversions TRUE->True, FALSE->False.
-rw-r--r--CHANGES.current3
-rw-r--r--Source/Modules/octave.cxx6
-rw-r--r--Source/Modules/python.cxx2
-rw-r--r--Source/Modules/ruby.cxx6
4 files changed, 6 insertions, 11 deletions
diff --git a/CHANGES.current b/CHANGES.current
index 9c014aa82..1d09ab875 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -6,6 +6,9 @@ Version 2.0.10 (in progress)
============================
2013-01-28: William
+ [Python] Apply patch SF #334 - Fix default value conversions "TRUE"->True, "FALSE"->False.
+
+2013-01-28: William
[Java] Apply patch SF #335 - Truly ignore constructors in directors with %ignore.
2013-01-18: Brant Kyser
diff --git a/Source/Modules/octave.cxx b/Source/Modules/octave.cxx
index 5584176a1..bbe442b7e 100644
--- a/Source/Modules/octave.cxx
+++ b/Source/Modules/octave.cxx
@@ -524,11 +524,7 @@ public:
}
if (Strcmp(v, "NULL") == 0)
return SwigType_ispointer(t) ? NewString("nil") : NewString("0");
- else if (Strcmp(v, "true") == 0 || Strcmp(v, "TRUE") == 0)
- return NewString("true");
- else if (Strcmp(v, "false") == 0 || Strcmp(v, "FALSE") == 0)
- return NewString("false");
- if (Strcmp(v, "true") == 0 || Strcmp(v, "FALSE") == 0)
+ if (Strcmp(v, "true") == 0 || Strcmp(v, "TRUE") == 0)
return NewString("true");
if (Strcmp(v, "false") == 0 || Strcmp(v, "FALSE") == 0)
return NewString("false");
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index 280a36923..e3d8c7d50 100644
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -1556,7 +1556,7 @@ public:
else
return v;
}
- if (Strcmp(v, "true") == 0 || Strcmp(v, "FALSE") == 0)
+ if (Strcmp(v, "true") == 0 || Strcmp(v, "TRUE") == 0)
return NewString("True");
if (Strcmp(v, "false") == 0 || Strcmp(v, "FALSE") == 0)
return NewString("False");
diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx
index eaec0e185..48680e803 100644
--- a/Source/Modules/ruby.cxx
+++ b/Source/Modules/ruby.cxx
@@ -790,11 +790,7 @@ private:
}
if (Strcmp(v, "NULL") == 0)
return SwigType_ispointer(t) ? NewString("nil") : NewString("0");
- else if (Strcmp(v, "true") == 0 || Strcmp(v, "TRUE") == 0)
- return NewString("true");
- else if (Strcmp(v, "false") == 0 || Strcmp(v, "FALSE") == 0)
- return NewString("false");
- if (Strcmp(v, "true") == 0 || Strcmp(v, "FALSE") == 0)
+ if (Strcmp(v, "true") == 0 || Strcmp(v, "TRUE") == 0)
return NewString("True");
if (Strcmp(v, "false") == 0 || Strcmp(v, "FALSE") == 0)
return NewString("False");