diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-01-19 15:21:01 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-01-27 09:58:40 +0000 |
commit | 34a5fa2f61ffec806373439cf9c53c60b209b40e (patch) | |
tree | 3401c053560c4d8cedff727a555c30d10fbf28d0 /generator.py | |
parent | bc90127cb6d2fff653ca7533bf32b8fe5c268b1d (diff) | |
download | libvirt-python-34a5fa2f61ffec806373439cf9c53c60b209b40e.tar.gz |
Removed unused 'py_return_types' code from generator
The 'py_return_types' data structure and associated code
in the generator is inherited from libxml. This has never
been used in libvirt, so delete it to simplify the generator.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'generator.py')
-rwxr-xr-x | generator.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/generator.py b/generator.py index decda72..8998b53 100755 --- a/generator.py +++ b/generator.py @@ -365,9 +365,6 @@ py_types = { 'const virDomainSnapshot *': ('O', "virDomainSnapshot", "virDomainSnapshotPtr", "virDomainSnapshotPtr"), } -py_return_types = { -} - unknown_types = {} ####################################################################### @@ -743,14 +740,6 @@ def print_function_wrapper(module, name, output, export, include): if n == "charPtr": ret_convert = ret_convert + " free(c_retval);\n" ret_convert = ret_convert + " return py_retval;\n" - elif ret[0] in py_return_types: - (f, t, n, c) = py_return_types[ret[0]] - c_return = " %s c_retval;\n" % (ret[0]) - c_call = "\n c_retval = %s(%s);\n" % (name, c_call) - ret_convert = " py_retval = libvirt_%sWrap((%s) c_retval);\n" % (n,c) - if n == "charPtr": - ret_convert = ret_convert + " free(c_retval);\n" - ret_convert = ret_convert + " return py_retval;\n" else: if ret[0] in skipped_types: return 0 @@ -863,7 +852,6 @@ def print_c_pointer(classname, output, export, include): def buildStubs(module, api_xml): global py_types - global py_return_types global unknown_types global onlyOverrides @@ -1290,7 +1278,6 @@ def writeDoc(module, name, args, indent, output): def buildWrappers(module): global ctypes global py_types - global py_return_types global unknown_types global functions global function_classes |