提交 9fbfcd3b 编写于 作者: M Matthias Bolte

remote generator: Handle struct returning functions better (part 2)

Commit 64000eab is part 1, that only covered the daemon side by
accident. Part 2 covers the client side too.
上级 6c88f119
...@@ -1225,21 +1225,14 @@ elsif ($opt_k) { ...@@ -1225,21 +1225,14 @@ elsif ($opt_k) {
# select struct type for multi-return-value functions # select struct type for multi-return-value functions
if ($multi_ret) { if ($multi_ret) {
my $last_arg; if (!(defined $call->{ret_offset})) {
my $struct_name = $call->{ProcName}; die "multi-return-value without insert@<offset> annotation: $call->{ret}";
$struct_name =~ s/Get//;
if ($call->{ProcName} eq "DomainGetBlockInfo") {
# SPECIAL: virDomainGetBlockInfo has flags parameter after
# the struct parameter in its signature
$last_arg = pop(@args_list);
} }
push(@args_list, "vir${struct_name}Ptr result"); my $struct_name = $call->{ProcName};
$struct_name =~ s/Get//;
if (defined $last_arg) { splice(@args_list, $call->{ret_offset}, 0, ("vir${struct_name}Ptr result"));
push(@args_list, $last_arg);
}
} }
if ($call->{streamflag} ne "none") { if ($call->{streamflag} ne "none") {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册