summaryrefslogtreecommitdiffstats
path: root/generator.py
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2006-11-09 15:32:44 +0000
committerDaniel Veillard <veillard@redhat.com>2006-11-09 15:32:44 +0000
commit0de5f70534043c651d19bb86b29e11a5e97fc5f5 (patch)
tree385d33905ad2552e202e524650b63199f897604a /generator.py
parent945919ffff7f4e856d17d2b5a6b48cab5417d92f (diff)
downloadlibvirt-python-v6-0de5f70534043c651d19bb86b29e11a5e97fc5f5.tar.gz
libvirt-python-v6-0de5f70534043c651d19bb86b29e11a5e97fc5f5.tar.xz
libvirt-python-v6-0de5f70534043c651d19bb86b29e11a5e97fc5f5.zip
* python/generator.py: changed the generator to generate a reference
from Domain class instances to the Connect they were issued from should fix rhbz#204490 * docs//*: rebuilt Daniel
Diffstat (limited to 'generator.py')
-rwxr-xr-xgenerator.py10
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.