diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/generator.ml b/src/generator.ml index 4fb9e4f2..85344aae 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -7516,9 +7516,17 @@ py_guestfs_close (PyObject *self, PyObject *args) pr "};\n"; pr "\n"; - emit_put_list_function typ ) structs; + (* Emit a put_TYPE_list function definition only if that function is used. *) + List.iter ( + function + | typ, (RStructListOnly | RStructAndList) -> + (* generate the function for typ *) + emit_put_list_function typ + | typ, _ -> () (* empty *) + ) rstructs_used; + (* Python wrapper functions. *) List.iter ( fun (name, style, _, _, _, _, _) -> |