python/lib/gen_code.py: also create outputs for rdo
authorPaul Brossier <piem@piem.org>
Mon, 13 Aug 2018 23:06:34 +0000 (01:06 +0200)
committerPaul Brossier <piem@piem.org>
Mon, 13 Aug 2018 23:06:34 +0000 (01:06 +0200)
python/lib/gen_code.py

index b29a59f..92de2ad 100644 (file)
@@ -178,6 +178,10 @@ class MappedObject(object):
         self.do_inputs = [get_params_types_names(self.do_proto)[1]]
         self.do_outputs = get_params_types_names(self.do_proto)[2:]
         struct_output_str = ["PyObject *{0[name]}; {1} c_{0[name]}".format(i, i['type'][:-1]) for i in self.do_outputs]
+        if len(self.prototypes['rdo']):
+            rdo_outputs = get_params_types_names(prototypes['rdo'][0])[2:]
+            struct_output_str += ["PyObject *{0[name]}; {1} c_{0[name]}".format(i, i['type'][:-1]) for i in rdo_outputs]
+            self.outputs += rdo_outputs
         self.struct_outputs = ";\n    ".join(struct_output_str)
 
         #print ("input_params: ", map(split_type, get_input_params(self.do_proto)))