diff options
Diffstat (limited to 'generator.py')
-rwxr-xr-x | generator.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/generator.py b/generator.py index 5aa2625..d921f98 100755 --- a/generator.py +++ b/generator.py @@ -540,6 +540,10 @@ classes_destructors = { "virConnect": "virConnectClose", } +classes_references = { + "virDomain": "virConnect", +} + functions_noexcept = { } @@ -891,6 +895,12 @@ def buildWrappers(): classes.write(classes_type[ret[0]][1] % ("ret")); classes.write("\n"); + # + # hook up a reference if needed + # + if classes_references.has_key(classes_type[ret[0]][2]): + classes.write(" __tmp.ref = self\n"); + # # Sometime one need to keep references of the source # class in the returned class object. |