New PyBindGen, fixes python wrapper identity issue.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sat, 23 Aug 2008 22:35:10 +0100
changeset 3546cecda7126440
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
     1.1 --- a/bindings/python/ns3modulegen.py	Tue Aug 19 14:13:01 2008 -0400
     1.2 +++ b/bindings/python/ns3modulegen.py	Sat Aug 23 22:35:10 2008 +0100
     1.3 @@ -36,6 +36,8 @@
     1.4          return True
     1.5  pybindgen.settings.error_handler = ErrorHandler()
     1.6  
     1.7 +pybindgen.settings.wrapper_registry = pybindgen.settings.StdMapWrapperRegistry
     1.8 +
     1.9  
    1.10  class MyMultiSectionFactory(MultiSectionFactory):
    1.11  
     2.1 --- a/bindings/python/wscript	Tue Aug 19 14:13:01 2008 -0400
     2.2 +++ b/bindings/python/wscript	Sat Aug 23 22:35:10 2008 +0100
     2.3 @@ -21,7 +21,7 @@
     2.4      os.environ['PYTHONPATH'] = LOCAL_PYBINDGEN_PATH
     2.5  
     2.6  ## https://launchpad.net/pybindgen/
     2.7 -REQUIRED_PYBINDGEN_VERSION = (0, 9, 0, 560)
     2.8 +REQUIRED_PYBINDGEN_VERSION = (0, 9, 0, 563)
     2.9  REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
    2.10  
    2.11  
     3.1 --- a/utils/python-unit-tests.py	Tue Aug 19 14:13:01 2008 -0400
     3.2 +++ b/utils/python-unit-tests.py	Sat Aug 23 22:35:10 2008 +0100
     3.3 @@ -114,13 +114,7 @@
     3.4          c1 = csma.GetChannel()
     3.5          c2 = csma.GetChannel()
     3.6  
     3.7 -        ## FIXME: it is a PyBindGen bug that comparison via hash
     3.8 -        ## functions is required.  However it should be noted that
     3.9 -        ## hash(channel) here basically returns the self->obj pointer,
    3.10 -        ## so if hash(c1) == hash(c2) then we know for sure that c1
    3.11 -        ## and c2 are the same channel, even if with different python
    3.12 -        ## wrappers.
    3.13 -        self.assertEqual(hash(c1), hash(c2))
    3.14 +        self.assert_(c1 is c2)
    3.15  
    3.16  if __name__ == '__main__':
    3.17      unittest.main()