diff --git a/bindings/python/ns3modulegen.py b/bindings/python/ns3modulegen.py index 7bb17e17f..1798fc03a 100644 --- a/bindings/python/ns3modulegen.py +++ b/bindings/python/ns3modulegen.py @@ -36,6 +36,8 @@ class ErrorHandler(pybindgen.settings.ErrorHandler): return True pybindgen.settings.error_handler = ErrorHandler() +pybindgen.settings.wrapper_registry = pybindgen.settings.StdMapWrapperRegistry + class MyMultiSectionFactory(MultiSectionFactory): diff --git a/bindings/python/wscript b/bindings/python/wscript index b910f42f1..96051c32e 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -21,7 +21,7 @@ else: 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) diff --git a/utils/python-unit-tests.py b/utils/python-unit-tests.py index 623b16b7c..afd7e3c00 100644 --- a/utils/python-unit-tests.py +++ b/utils/python-unit-tests.py @@ -114,13 +114,7 @@ class TestSimulator(unittest.TestCase): 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()