New PyBindGen, fixes python wrapper identity issue.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sat, 23 Aug 2008 22:35:10 +0100
changeset 3546 cecda7126440
parent 3545 9358e0be63d2
child 3547 e60083af704c
child 3554 6d041a5be1db
New PyBindGen, fixes python wrapper identity issue.
bindings/python/ns3modulegen.py
bindings/python/wscript
utils/python-unit-tests.py
--- a/bindings/python/ns3modulegen.py	Tue Aug 19 14:13:01 2008 -0400
+++ b/bindings/python/ns3modulegen.py	Sat Aug 23 22:35:10 2008 +0100
@@ -36,6 +36,8 @@
         return True
 pybindgen.settings.error_handler = ErrorHandler()
 
+pybindgen.settings.wrapper_registry = pybindgen.settings.StdMapWrapperRegistry
+
 
 class MyMultiSectionFactory(MultiSectionFactory):
 
--- a/bindings/python/wscript	Tue Aug 19 14:13:01 2008 -0400
+++ b/bindings/python/wscript	Sat Aug 23 22:35:10 2008 +0100
@@ -21,7 +21,7 @@
     os.environ['PYTHONPATH'] = LOCAL_PYBINDGEN_PATH
 
 ## https://launchpad.net/pybindgen/
-REQUIRED_PYBINDGEN_VERSION = (0, 9, 0, 560)
+REQUIRED_PYBINDGEN_VERSION = (0, 9, 0, 563)
 REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
 
 
--- a/utils/python-unit-tests.py	Tue Aug 19 14:13:01 2008 -0400
+++ b/utils/python-unit-tests.py	Sat Aug 23 22:35:10 2008 +0100
@@ -114,13 +114,7 @@
         c1 = csma.GetChannel()
         c2 = csma.GetChannel()
 
-        ## FIXME: it is a PyBindGen bug that comparison via hash
-        ## functions is required.  However it should be noted that
-        ## hash(channel) here basically returns the self->obj pointer,
-        ## so if hash(c1) == hash(c2) then we know for sure that c1
-        ## and c2 are the same channel, even if with different python
-        ## wrappers.
-        self.assertEqual(hash(c1), hash(c2))
+        self.assert_(c1 is c2)
 
 if __name__ == '__main__':
     unittest.main()