bindings/python/ns3modulescan.py
changeset 5755 4214e2d08941
parent 5753 8c105b521d1b
child 5778 bb28b3985514
--- a/bindings/python/ns3modulescan.py	Wed Nov 18 12:42:33 2009 +0000
+++ b/bindings/python/ns3modulescan.py	Thu Nov 19 11:19:39 2009 +0000
@@ -8,7 +8,7 @@
 from pybindgen.typehandlers.codesink import FileCodeSink
 from pygccxml.declarations import templates
 from pygccxml.declarations.class_declaration import class_t
-from pygccxml.declarations.calldef import free_function_t, member_function_t, constructor_t
+from pygccxml.declarations.calldef import free_function_t, member_function_t, constructor_t, calldef_t
 
 
 ## we need the smart pointer type transformation to be active even
@@ -161,6 +161,13 @@
             and pygccxml_definition.name == 'Run':
         global_annotations['ignore'] = True
 
+    ## http://www.gccxml.org/Bug/view.php?id=9915
+    if isinstance(pygccxml_definition, calldef_t):
+        for arg in pygccxml_definition.arguments:
+            if arg.default_value is None:
+                continue
+            if "ns3::MilliSeconds( )" == arg.default_value:
+                arg.default_value = "ns3::MilliSeconds(0)"
 
     ## classes
     if isinstance(pygccxml_definition, class_t):