summaryrefslogtreecommitdiff
path: root/xgbgen/translation.go
diff options
context:
space:
mode:
authorAlessandro Arzilli <[email protected]>2022-10-29 21:44:00 +0200
committerMilan Nikolic <[email protected]>2022-10-29 21:44:00 +0200
commit54fbc6f8722629e1bd14c432e9e17499d2925ac7 (patch)
tree325e5c0a0747963e2b9804ee03a577b594731c3f /xgbgen/translation.go
parent7effddcf465f2b8e142c828c90951614922d9b32 (diff)
Changed xgbgen to support xcb-proto >= 1.12
Diffstat (limited to 'xgbgen/translation.go')
-rw-r--r--xgbgen/translation.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/xgbgen/translation.go b/xgbgen/translation.go
index f595e5f..d35fa88 100644
--- a/xgbgen/translation.go
+++ b/xgbgen/translation.go
@@ -325,12 +325,14 @@ func (x *XMLField) Translate(parent interface{}) Field {
case "pad":
return &PadField{
Bytes: x.Bytes,
+ Align: x.Align,
}
case "field":
- return &SingleField{
+ s := &SingleField{
xmlName: x.Name,
Type: newTranslation(x.Type),
}
+ return s
case "list":
return &ListField{
xmlName: x.Name,
@@ -365,6 +367,8 @@ func (x *XMLField) Translate(parent interface{}) Field {
swtch.Bitcases[i] = bitcase.Translate()
}
return swtch
+ case "required_start_align":
+ return &RequiredStartAlign{}
}
log.Panicf("Unrecognized field element: %s", x.XMLName.Local)