xml-to-wire: fix handling of new_id without interface
This commit is contained in:
parent
66efc946b6
commit
01fc2f128d
2 changed files with 5 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ request bind {
|
||||||
name: u32,
|
name: u32,
|
||||||
interface: str,
|
interface: str,
|
||||||
version: u32,
|
version: u32,
|
||||||
id: id(object),
|
id: id(object) (new),
|
||||||
}
|
}
|
||||||
|
|
||||||
event global {
|
event global {
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,10 @@ fn handle_file_(path: &str) -> Result<(), BuilderError> {
|
||||||
args.next();
|
args.next();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if arg.ty == ArgType::NewId && arg.interface.is_none() {
|
||||||
|
writeln!(file, " interface: str,")?;
|
||||||
|
writeln!(file, " version: u32,")?;
|
||||||
|
}
|
||||||
write!(file, " {}: ", arg.name)?;
|
write!(file, " {}: ", arg.name)?;
|
||||||
'ty: {
|
'ty: {
|
||||||
let ty = match arg.ty {
|
let ty = match arg.ty {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue