* python/image2d-misc.py: Always get the domain of an image by
calling it domain() method.
* python/Makefile.am (TESTS): Remove conditional HAVE_SWIG_1_3_39
and always exercise dynamic-image2d-misc.py.
---
swilena/ChangeLog | 9 +++++++++
swilena/python/Makefile.am | 7 +------
swilena/python/image2d-misc.py | 13 +------------
3 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/swilena/ChangeLog b/swilena/ChangeLog
index c52ff12..95369a7 100644
--- a/swilena/ChangeLog
+++ b/swilena/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-09 Roland Levillain <roland(a)lrde.epita.fr>
+
+ No longer handle SWIG < 1.3.39 specifically.
+
+ * python/image2d-misc.py: Always get the domain of an image by
+ calling it domain() method.
+ * python/Makefile.am (TESTS): Remove conditional HAVE_SWIG_1_3_39
+ and always exercise dynamic-image2d-misc.py.
+
2009-06-08 Roland Levillain <roland(a)lrde.epita.fr>
Fix a bug in Swilena's wrapper of box2d.
diff --git a/swilena/python/Makefile.am b/swilena/python/Makefile.am
index 1525d5d..0658ec1 100644
--- a/swilena/python/Makefile.am
+++ b/swilena/python/Makefile.am
@@ -212,11 +212,6 @@ $(srcdir)/run.stamp: $(RUN_IN)
# as `--python' to `run'.
TESTS = \
box2d-misc.py \
- image2d-misc.py morpho-fun.py morpho-segm.py
-
-# Do no exercise tests known to fail with old versions of SWIG.
-if HAVE_SWIG_1_3_39
-TESTS += dynamic-image2d-misc.py
-endif HAVE_SWIG_1_3_39
+ image2d-misc.py morpho-fun.py morpho-segm.py dynamic-image2d-misc.py
EXTRA_DIST += $(TESTS)
diff --git a/swilena/python/image2d-misc.py b/swilena/python/image2d-misc.py
index a7933d1..737b39b 100644
--- a/swilena/python/image2d-misc.py
+++ b/swilena/python/image2d-misc.py
@@ -22,24 +22,13 @@ from swilena import *
ima = image2d_int.image2d_int(3, 3)
image2d_int.fill(ima, 42)
-# FIXME: Help version of SWIG older than 1.3.39. For instance, SWIG
-# 1.3.36 does not generate code smart enough to detect that the output
-# of `ima.domain()' should be a wrapped `box2d'. Help it.
-#
-# We should get rid of this when SWIG 1.3.39 (or greater) is
-# widespread.
-if config.have_swig(0x010339):
- domain = ima.domain()
-else:
- domain = box2d(3, 3)
-
# FIXME: Eventually we'd like to be able to write this:
#
# for p in ima.domain():
# print "ima(" + str(p) + ") = " + ima(p)
#
# as it is generic and way closer to what we do in C++.
-for p in domain:
+for p in ima.domain():
# FIXME: Handling POD types (like int) as value types is not
# transparent: ima(p) returns a pointer to int wrapped in a SWIG
# object, and cannot be easily converted to a Python integer
--
1.6.1.2
Show replies by date