[fidl] Use explicit ordinal syntax for static unions
Also updates goldens which includes the fidlc changes
from https://fuchsia-review.googlesource.com/c/fuchsia/+/336368
Change-Id: I3769270c0c937007b1a614cf0b5568b0066d8524
diff --git a/src/syscall/zx/fidl/bindingstest/impl.go b/src/syscall/zx/fidl/bindingstest/impl.go
index 5027213..9d30822 100644
--- a/src/syscall/zx/fidl/bindingstest/impl.go
+++ b/src/syscall/zx/fidl/bindingstest/impl.go
@@ -277,7 +277,7 @@
}
type TestUnion1 struct {
- _ struct{} `fidl:"s,24,8" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
+ _ struct{} `fidl:"s,24,8" fidl_size_v1:"48" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"48" fidl_alignment_v1_no_ee:"8"`
A Union1 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
B *Union1 `fidl:"16" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
@@ -585,9 +585,9 @@
type Union1 struct {
I_union1Tag `fidl:"u,16,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- A [3]int8 `fidl:"1140208200"`
- B TestSimple `fidl:"1101191659"`
- D float32 `fidl:"1193101976"`
+ A [3]int8 `fidl:"1"`
+ B TestSimple `fidl:"2"`
+ D float32 `fidl:"3"`
}
func (u *Union1) Which() I_union1Tag {
@@ -638,9 +638,9 @@
type XUnion1AsUnion struct {
I_xUnion1AsUnionTag `fidl:"u,16,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- A [3]int8 `fidl:"1815116267"`
- B TestSimple `fidl:"219568201"`
- D float32 `fidl:"1047172132"`
+ A [3]int8 `fidl:"1"`
+ B TestSimple `fidl:"2"`
+ D float32 `fidl:"3"`
}
func (u *XUnion1AsUnion) Which() I_xUnion1AsUnionTag {
@@ -690,8 +690,8 @@
type UnionInsideUnion struct {
I_unionInsideUnionTag `fidl:"u,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- A float32 `fidl:"1274799307"`
- B XUnion1AsUnion `fidl:"340650192"`
+ A float32 `fidl:"1"`
+ B XUnion1AsUnion `fidl:"2"`
}
func (u *UnionInsideUnion) Which() I_unionInsideUnionTag {
@@ -732,10 +732,10 @@
type SimpleUnion struct {
I_simpleUnionTag `fidl:"u,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- I32 int32 `fidl:"2133387115"`
- I64 int64 `fidl:"809723265"`
- S Int64Struct `fidl:"1133668882"`
- Str string `fidl:"1886911784,"`
+ I32 int32 `fidl:"1"`
+ I64 int64 `fidl:"2"`
+ S Int64Struct `fidl:"3"`
+ Str string `fidl:"4,"`
}
func (u *SimpleUnion) Which() I_simpleUnionTag {
@@ -796,8 +796,8 @@
type IpAddressConfig struct {
I_ipAddressConfigTag `fidl:"u,28,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- PaddingSize24Align4 [6]uint32 `fidl:"1850696643"`
- Dhcp bool `fidl:"500027731"`
+ PaddingSize24Align4 [6]uint32 `fidl:"1"`
+ Dhcp bool `fidl:"2"`
}
func (u *IpAddressConfig) Which() I_ipAddressConfigTag {
@@ -829,27 +829,27 @@
type I_xUnion1Tag uint32
const (
- XUnion1_unknownData = 0 // 0x00000000
- XUnion1A = 416714395 // 0x18d68e9b
- XUnion1B = 863456686 // 0x33774dae
- XUnion1D = 1912225229 // 0x71fa3dcd
+ XUnion1_unknownData = 0 // 0x00000000
+ XUnion1A = 1 // 0x00000001
+ XUnion1B = 2 // 0x00000002
+ XUnion1D = 3 // 0x00000003
)
type XUnion1 struct {
I_xUnion1Tag `fidl:"x,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
I_unknownData []byte
- A [3]int8 `fidl:"416714395"`
- B TestSimple `fidl:"863456686"`
- D float32 `fidl:"1912225229"`
+ A [3]int8 `fidl:"1"`
+ B TestSimple `fidl:"2"`
+ D float32 `fidl:"3"`
}
func (_m *XUnion1) Which() I_xUnion1Tag {
switch _m.I_xUnion1Tag {
- case 416714395:
+ case 1:
return XUnion1A
- case 863456686:
+ case 2:
return XUnion1B
- case 1912225229:
+ case 3:
return XUnion1D
default:
return XUnion1_unknownData
@@ -896,23 +896,23 @@
type I_xUnionInsideXUnionTag uint32
const (
- XUnionInsideXUnion_unknownData = 0 // 0x00000000
- XUnionInsideXUnionA = 1100463121 // 0x4197bc11
- XUnionInsideXUnionB = 796211677 // 0x2f7539dd
+ XUnionInsideXUnion_unknownData = 0 // 0x00000000
+ XUnionInsideXUnionA = 1 // 0x00000001
+ XUnionInsideXUnionB = 2 // 0x00000002
)
type XUnionInsideXUnion struct {
I_xUnionInsideXUnionTag `fidl:"x,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
I_unknownData []byte
- A float32 `fidl:"1100463121"`
- B XUnion1 `fidl:"796211677"`
+ A float32 `fidl:"1"`
+ B XUnion1 `fidl:"2"`
}
func (_m *XUnionInsideXUnion) Which() I_xUnionInsideXUnionTag {
switch _m.I_xUnionInsideXUnionTag {
- case 1100463121:
+ case 1:
return XUnionInsideXUnionA
- case 796211677:
+ case 2:
return XUnionInsideXUnionB
default:
return XUnionInsideXUnion_unknownData
diff --git a/src/syscall/zx/fidl/bindingstest/test.test.fidl b/src/syscall/zx/fidl/bindingstest/test.test.fidl
index e03fbb2..c6e6dc9 100644
--- a/src/syscall/zx/fidl/bindingstest/test.test.fidl
+++ b/src/syscall/zx/fidl/bindingstest/test.test.fidl
@@ -117,9 +117,9 @@
};
union Union1 {
- array<int8>:3 a;
- TestSimple b;
- float32 d;
+ 1: array<int8>:3 a;
+ 2: TestSimple b;
+ 3: float32 d;
};
struct TestUnion1 {
@@ -133,9 +133,9 @@
};
xunion XUnion1 {
- array<int8>:3 a;
- TestSimple b;
- float32 d;
+ 1: array<int8>:3 a;
+ 2: TestSimple b;
+ 3: float32 d;
};
struct XUnion1Struct {
@@ -143,9 +143,9 @@
};
union XUnion1AsUnion {
- array<int8>:3 a;
- TestSimple b;
- float32 d;
+ 1: array<int8>:3 a;
+ 2: TestSimple b;
+ 3: float32 d;
};
struct XUnion1AsUnionStruct {
@@ -153,8 +153,8 @@
};
union UnionInsideUnion {
- float32 a;
- XUnion1AsUnion b;
+ 1: float32 a;
+ 2: XUnion1AsUnion b;
};
struct UnionInsideUnionStruct {
@@ -162,8 +162,8 @@
};
xunion XUnionInsideXUnion {
- float32 a;
- XUnion1 b;
+ 1: float32 a;
+ 2: XUnion1 b;
};
struct XUnionInsideXUnionStruct {
@@ -271,10 +271,10 @@
};
union SimpleUnion {
- int32 i32;
- int64 i64;
- Int64Struct s;
- string str;
+ 1: int32 i32;
+ 2: int64 i64;
+ 3: Int64Struct s;
+ 4: string str;
};
struct Int64Struct {
@@ -304,8 +304,8 @@
};
union IpAddressConfig {
- array<uint32>:6 padding_size_24_align_4;
- bool dhcp;
+ 1: array<uint32>:6 padding_size_24_align_4;
+ 2: bool dhcp;
};
struct TestAddEthernetDeviceRequest {
diff --git a/src/syscall/zx/fidl/conformance/impl.go b/src/syscall/zx/fidl/conformance/impl.go
index 7a930fa..57a60dd 100644
--- a/src/syscall/zx/fidl/conformance/impl.go
+++ b/src/syscall/zx/fidl/conformance/impl.go
@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Code generated by tools/fidl/gidl-conformance-suite/regen.sh; DO NOT EDIT.
+// GENERATED FILE: Do not edit!
+//
+// To rebuild this file, invoke third_party/go/regen-fidl.
// +build fuchsia
-//
-// Code generated by fidlgen; DO NOT EDIT.
-
package conformance
import (
@@ -16,6 +15,227 @@
_bindings "syscall/zx/fidl"
)
+type ThreeByte struct {
+ _ struct{} `fidl:"s,3,1" fidl_size_v1:"3" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"3" fidl_alignment_v1_no_ee:"1"`
+ Elem1 uint8 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Elem2 uint8 `fidl:"1" fidl_offset_v1:"1" fidl_offset_v1_no_ee:"1"`
+ Elem3 uint8 `fidl:"2" fidl_offset_v1:"2" fidl_offset_v1_no_ee:"2"`
+}
+
+var _mThreeByte = _bindings.CreateLazyMarshaler(ThreeByte{})
+
+func (msg *ThreeByte) Marshaler() _bindings.Marshaler {
+ return _mThreeByte
+}
+
+type FiveByte struct {
+ _ struct{} `fidl:"s,8,4" fidl_size_v1:"8" fidl_alignment_v1:"4" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"4"`
+ Elem1 uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Elem2 uint8 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
+}
+
+var _mFiveByte = _bindings.CreateLazyMarshaler(FiveByte{})
+
+func (msg *FiveByte) Marshaler() _bindings.Marshaler {
+ return _mFiveByte
+}
+
+type ThreeByteInStruct struct {
+ _ struct{} `fidl:"s,9,1" fidl_size_v1:"9" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"9" fidl_alignment_v1_no_ee:"1"`
+ Elem1 ThreeByte `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Elem2 ThreeByte `fidl:"3" fidl_offset_v1:"3" fidl_offset_v1_no_ee:"3"`
+ Elem3 ThreeByte `fidl:"6" fidl_offset_v1:"6" fidl_offset_v1_no_ee:"6"`
+}
+
+var _mThreeByteInStruct = _bindings.CreateLazyMarshaler(ThreeByteInStruct{})
+
+func (msg *ThreeByteInStruct) Marshaler() _bindings.Marshaler {
+ return _mThreeByteInStruct
+}
+
+type FiveByteInStruct struct {
+ _ struct{} `fidl:"s,24,4" fidl_size_v1:"24" fidl_alignment_v1:"4" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"4"`
+ Elem1 FiveByte `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Elem2 FiveByte `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ Elem3 FiveByte `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+}
+
+var _mFiveByteInStruct = _bindings.CreateLazyMarshaler(FiveByteInStruct{})
+
+func (msg *FiveByteInStruct) Marshaler() _bindings.Marshaler {
+ return _mFiveByteInStruct
+}
+
+type ThreeByteInVector struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ Elems []ThreeByte `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mThreeByteInVector = _bindings.CreateLazyMarshaler(ThreeByteInVector{})
+
+func (msg *ThreeByteInVector) Marshaler() _bindings.Marshaler {
+ return _mThreeByteInVector
+}
+
+type FiveByteInVector struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ Elems []FiveByte `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mFiveByteInVector = _bindings.CreateLazyMarshaler(FiveByteInVector{})
+
+func (msg *FiveByteInVector) Marshaler() _bindings.Marshaler {
+ return _mFiveByteInVector
+}
+
+type ThreeByteInArray struct {
+ _ struct{} `fidl:"s,9,1" fidl_size_v1:"9" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"9" fidl_alignment_v1_no_ee:"1"`
+ Elems [3]ThreeByte `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mThreeByteInArray = _bindings.CreateLazyMarshaler(ThreeByteInArray{})
+
+func (msg *ThreeByteInArray) Marshaler() _bindings.Marshaler {
+ return _mThreeByteInArray
+}
+
+type FiveByteInArray struct {
+ _ struct{} `fidl:"s,24,4" fidl_size_v1:"24" fidl_alignment_v1:"4" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"4"`
+ Elems [3]FiveByte `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mFiveByteInArray = _bindings.CreateLazyMarshaler(FiveByteInArray{})
+
+func (msg *FiveByteInArray) Marshaler() _bindings.Marshaler {
+ return _mFiveByteInArray
+}
+
+type StructWithInt struct {
+ _ struct{} `fidl:"s,4,4" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
+ X int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mStructWithInt = _bindings.CreateLazyMarshaler(StructWithInt{})
+
+func (msg *StructWithInt) Marshaler() _bindings.Marshaler {
+ return _mStructWithInt
+}
+
+type StructWithArrays struct {
+ _ struct{} `fidl:"s,120,8" fidl_size_v1:"120" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"120" fidl_alignment_v1_no_ee:"8"`
+ ArrInt [2]int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ ArrString [2]string `fidl:"8," fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ ArrNullableString [2]*string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ ArrStruct [2]StructWithInt `fidl:"72" fidl_offset_v1:"72" fidl_offset_v1_no_ee:"72"`
+ ArrNullableStruct [2]*StructWithInt `fidl:"80" fidl_offset_v1:"80" fidl_offset_v1_no_ee:"80"`
+ ArrArrInt [2][3]int32 `fidl:"96" fidl_offset_v1:"96" fidl_offset_v1_no_ee:"96"`
+}
+
+var _mStructWithArrays = _bindings.CreateLazyMarshaler(StructWithArrays{})
+
+func (msg *StructWithArrays) Marshaler() _bindings.Marshaler {
+ return _mStructWithArrays
+}
+
+type StructWithVectors struct {
+ _ struct{} `fidl:"s,112,8" fidl_size_v1:"112" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"112" fidl_alignment_v1_no_ee:"8"`
+ VecEmpty []int32 `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ VecInt []int32 `fidl:"16," fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ VecString []string `fidl:"32,," fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+ VecNullableString []*string `fidl:"48,," fidl_offset_v1:"48" fidl_offset_v1_no_ee:"48"`
+ VecStruct []StructWithInt `fidl:"64," fidl_offset_v1:"64" fidl_offset_v1_no_ee:"64"`
+ VecNullableStruct []*StructWithInt `fidl:"80," fidl_offset_v1:"80" fidl_offset_v1_no_ee:"80"`
+ VecVecInt [][]int32 `fidl:"96,," fidl_offset_v1:"96" fidl_offset_v1_no_ee:"96"`
+}
+
+var _mStructWithVectors = _bindings.CreateLazyMarshaler(StructWithVectors{})
+
+func (msg *StructWithVectors) Marshaler() _bindings.Marshaler {
+ return _mStructWithVectors
+}
+
+type TestXUnionInTable struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ Value XUnionInTable `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mTestXUnionInTable = _bindings.CreateLazyMarshaler(TestXUnionInTable{})
+
+func (msg *TestXUnionInTable) Marshaler() _bindings.Marshaler {
+ return _mTestXUnionInTable
+}
+
+type InterfaceConfig struct {
+ _ struct{} `fidl:"s,48,8" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
+ Name string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ IpAddressConfig IpAddressConfig `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+}
+
+var _mInterfaceConfig = _bindings.CreateLazyMarshaler(InterfaceConfig{})
+
+func (msg *InterfaceConfig) Marshaler() _bindings.Marshaler {
+ return _mInterfaceConfig
+}
+
+type TestAddEthernetDeviceRequest struct {
+ _ struct{} `fidl:"s,72,8" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
+ TopologicalPath string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Config InterfaceConfig `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ ThisShouldBeAHandle uint32 `fidl:"64" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
+}
+
+var _mTestAddEthernetDeviceRequest = _bindings.CreateLazyMarshaler(TestAddEthernetDeviceRequest{})
+
+func (msg *TestAddEthernetDeviceRequest) Marshaler() _bindings.Marshaler {
+ return _mTestAddEthernetDeviceRequest
+}
+
+type NodeAttributes struct {
+ _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
+ Mode uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Id uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ ContentSize uint64 `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ StorageSize uint64 `fidl:"24" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ LinkCount uint64 `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+ CreationTime uint64 `fidl:"40" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ ModificationTime uint64 `fidl:"48" fidl_offset_v1:"48" fidl_offset_v1_no_ee:"48"`
+}
+
+var _mNodeAttributes = _bindings.CreateLazyMarshaler(NodeAttributes{})
+
+func (msg *NodeAttributes) Marshaler() _bindings.Marshaler {
+ return _mNodeAttributes
+}
+
+type FileGetAttrResponse struct {
+ _ struct{} `fidl:"s,64,8" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+}
+
+var _mFileGetAttrResponse = _bindings.CreateLazyMarshaler(FileGetAttrResponse{})
+
+func (msg *FileGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mFileGetAttrResponse
+}
+
+type StructWithOptionals struct {
+ _ struct{} `fidl:"s,104,8" fidl_size_v1:"128" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"128" fidl_alignment_v1_no_ee:"8"`
+ S EmptyStruct `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ S2 *EmptyStruct `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ T TableWithEmptyStruct `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Xu XUnionWithEmptyStruct `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+ Xu2 *XUnionWithEmptyStruct `fidl:"56" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
+ U UnionWithEmptyStruct `fidl:"80" fidl_offset_v1:"80" fidl_offset_v1_no_ee:"80"`
+ U2 *UnionWithEmptyStruct `fidl:"96" fidl_offset_v1:"104" fidl_offset_v1_no_ee:"104"`
+}
+
+var _mStructWithOptionals = _bindings.CreateLazyMarshaler(StructWithOptionals{})
+
+func (msg *StructWithOptionals) Marshaler() _bindings.Marshaler {
+ return _mStructWithOptionals
+}
+
type MyBool struct {
_ struct{} `fidl:"s,1,1" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
Value bool `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
@@ -148,160 +368,6 @@
return _mMyFloat64
}
-type ThreeByte struct {
- _ struct{} `fidl:"s,3,1" fidl_size_v1:"3" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"3" fidl_alignment_v1_no_ee:"1"`
- Elem1 uint8 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Elem2 uint8 `fidl:"1" fidl_offset_v1:"1" fidl_offset_v1_no_ee:"1"`
- Elem3 uint8 `fidl:"2" fidl_offset_v1:"2" fidl_offset_v1_no_ee:"2"`
-}
-
-var _mThreeByte = _bindings.CreateLazyMarshaler(ThreeByte{})
-
-func (msg *ThreeByte) Marshaler() _bindings.Marshaler {
- return _mThreeByte
-}
-
-type FiveByte struct {
- _ struct{} `fidl:"s,8,4" fidl_size_v1:"8" fidl_alignment_v1:"4" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"4"`
- Elem1 uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Elem2 uint8 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
-}
-
-var _mFiveByte = _bindings.CreateLazyMarshaler(FiveByte{})
-
-func (msg *FiveByte) Marshaler() _bindings.Marshaler {
- return _mFiveByte
-}
-
-type ThreeByteInStruct struct {
- _ struct{} `fidl:"s,9,1" fidl_size_v1:"9" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"9" fidl_alignment_v1_no_ee:"1"`
- Elem1 ThreeByte `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Elem2 ThreeByte `fidl:"3" fidl_offset_v1:"3" fidl_offset_v1_no_ee:"3"`
- Elem3 ThreeByte `fidl:"6" fidl_offset_v1:"6" fidl_offset_v1_no_ee:"6"`
-}
-
-var _mThreeByteInStruct = _bindings.CreateLazyMarshaler(ThreeByteInStruct{})
-
-func (msg *ThreeByteInStruct) Marshaler() _bindings.Marshaler {
- return _mThreeByteInStruct
-}
-
-type FiveByteInStruct struct {
- _ struct{} `fidl:"s,24,4" fidl_size_v1:"24" fidl_alignment_v1:"4" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"4"`
- Elem1 FiveByte `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Elem2 FiveByte `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- Elem3 FiveByte `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
-}
-
-var _mFiveByteInStruct = _bindings.CreateLazyMarshaler(FiveByteInStruct{})
-
-func (msg *FiveByteInStruct) Marshaler() _bindings.Marshaler {
- return _mFiveByteInStruct
-}
-
-type ThreeByteInVector struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- Elems []ThreeByte `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mThreeByteInVector = _bindings.CreateLazyMarshaler(ThreeByteInVector{})
-
-func (msg *ThreeByteInVector) Marshaler() _bindings.Marshaler {
- return _mThreeByteInVector
-}
-
-type FiveByteInVector struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- Elems []FiveByte `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mFiveByteInVector = _bindings.CreateLazyMarshaler(FiveByteInVector{})
-
-func (msg *FiveByteInVector) Marshaler() _bindings.Marshaler {
- return _mFiveByteInVector
-}
-
-type ThreeByteInArray struct {
- _ struct{} `fidl:"s,9,1" fidl_size_v1:"9" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"9" fidl_alignment_v1_no_ee:"1"`
- Elems [3]ThreeByte `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mThreeByteInArray = _bindings.CreateLazyMarshaler(ThreeByteInArray{})
-
-func (msg *ThreeByteInArray) Marshaler() _bindings.Marshaler {
- return _mThreeByteInArray
-}
-
-type FiveByteInArray struct {
- _ struct{} `fidl:"s,24,4" fidl_size_v1:"24" fidl_alignment_v1:"4" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"4"`
- Elems [3]FiveByte `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mFiveByteInArray = _bindings.CreateLazyMarshaler(FiveByteInArray{})
-
-func (msg *FiveByteInArray) Marshaler() _bindings.Marshaler {
- return _mFiveByteInArray
-}
-
-type Int64Struct struct {
- _ struct{} `fidl:"s,8,8" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
- X int64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
-
-func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
- return _mInt64Struct
-}
-
-type TestInlineXUnionInStruct struct {
- _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
- Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Xu SampleXUnion `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- After string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
-}
-
-var _mTestInlineXUnionInStruct = _bindings.CreateLazyMarshaler(TestInlineXUnionInStruct{})
-
-func (msg *TestInlineXUnionInStruct) Marshaler() _bindings.Marshaler {
- return _mTestInlineXUnionInStruct
-}
-
-type TestOptionalXUnionInStruct struct {
- _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
- Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Xu *SampleXUnion `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- After string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
-}
-
-var _mTestOptionalXUnionInStruct = _bindings.CreateLazyMarshaler(TestOptionalXUnionInStruct{})
-
-func (msg *TestOptionalXUnionInStruct) Marshaler() _bindings.Marshaler {
- return _mTestOptionalXUnionInStruct
-}
-
-type TestStrictXUnionInStruct struct {
- _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- Xu SampleStrictXUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mTestStrictXUnionInStruct = _bindings.CreateLazyMarshaler(TestStrictXUnionInStruct{})
-
-func (msg *TestStrictXUnionInStruct) Marshaler() _bindings.Marshaler {
- return _mTestStrictXUnionInStruct
-}
-
-type TestFlexibleXUnionInStruct struct {
- _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- Xu SampleXUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mTestFlexibleXUnionInStruct = _bindings.CreateLazyMarshaler(TestFlexibleXUnionInStruct{})
-
-func (msg *TestFlexibleXUnionInStruct) Marshaler() _bindings.Marshaler {
- return _mTestFlexibleXUnionInStruct
-}
-
type Length2StringWrapper struct {
_ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
Length2String string `fidl:"0,2" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
@@ -324,174 +390,6 @@
return _mStringWrapper
}
-type StructWithOptionals struct {
- _ struct{} `fidl:"s,104,8" fidl_size_v1:"112" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"112" fidl_alignment_v1_no_ee:"8"`
- S EmptyStruct `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- S2 *EmptyStruct `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- T TableWithEmptyStruct `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Xu XUnionWithEmptyStruct `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- Xu2 *XUnionWithEmptyStruct `fidl:"56" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
- U UnionWithEmptyStruct `fidl:"80" fidl_offset_v1:"80" fidl_offset_v1_no_ee:"80"`
- U2 *UnionWithEmptyStruct `fidl:"96" fidl_offset_v1:"104" fidl_offset_v1_no_ee:"104"`
-}
-
-var _mStructWithOptionals = _bindings.CreateLazyMarshaler(StructWithOptionals{})
-
-func (msg *StructWithOptionals) Marshaler() _bindings.Marshaler {
- return _mStructWithOptionals
-}
-
-type TestXUnionInTable struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- Value XUnionInTable `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mTestXUnionInTable = _bindings.CreateLazyMarshaler(TestXUnionInTable{})
-
-func (msg *TestXUnionInTable) Marshaler() _bindings.Marshaler {
- return _mTestXUnionInTable
-}
-
-type InterfaceConfig struct {
- _ struct{} `fidl:"s,48,8" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
- Name string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- IpAddressConfig IpAddressConfig `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
-}
-
-var _mInterfaceConfig = _bindings.CreateLazyMarshaler(InterfaceConfig{})
-
-func (msg *InterfaceConfig) Marshaler() _bindings.Marshaler {
- return _mInterfaceConfig
-}
-
-type TestAddEthernetDeviceRequest struct {
- _ struct{} `fidl:"s,72,8" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
- TopologicalPath string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Config InterfaceConfig `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- ThisShouldBeAHandle uint32 `fidl:"64" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
-}
-
-var _mTestAddEthernetDeviceRequest = _bindings.CreateLazyMarshaler(TestAddEthernetDeviceRequest{})
-
-func (msg *TestAddEthernetDeviceRequest) Marshaler() _bindings.Marshaler {
- return _mTestAddEthernetDeviceRequest
-}
-
-type NodeAttributes struct {
- _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
- Mode uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Id uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- ContentSize uint64 `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- StorageSize uint64 `fidl:"24" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
- LinkCount uint64 `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- CreationTime uint64 `fidl:"40" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
- ModificationTime uint64 `fidl:"48" fidl_offset_v1:"48" fidl_offset_v1_no_ee:"48"`
-}
-
-var _mNodeAttributes = _bindings.CreateLazyMarshaler(NodeAttributes{})
-
-func (msg *NodeAttributes) Marshaler() _bindings.Marshaler {
- return _mNodeAttributes
-}
-
-type FileGetAttrResponse struct {
- _ struct{} `fidl:"s,64,8" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
- S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
-}
-
-var _mFileGetAttrResponse = _bindings.CreateLazyMarshaler(FileGetAttrResponse{})
-
-func (msg *FileGetAttrResponse) Marshaler() _bindings.Marshaler {
- return _mFileGetAttrResponse
-}
-
-type UnionWithBoundStringStruct struct {
- _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- V UnionWithBoundString `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mUnionWithBoundStringStruct = _bindings.CreateLazyMarshaler(UnionWithBoundStringStruct{})
-
-func (msg *UnionWithBoundStringStruct) Marshaler() _bindings.Marshaler {
- return _mUnionWithBoundStringStruct
-}
-
-type SingleVariantUnionStruct struct {
- _ struct{} `fidl:"s,8,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- U SingleVariantUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mSingleVariantUnionStruct = _bindings.CreateLazyMarshaler(SingleVariantUnionStruct{})
-
-func (msg *SingleVariantUnionStruct) Marshaler() _bindings.Marshaler {
- return _mSingleVariantUnionStruct
-}
-
-type SandwichUnionSize8Alignment4 struct {
- _ struct{} `fidl:"s,16,4" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
- Before uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Union UnionSize8Alignment4 `fidl:"4" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- After uint32 `fidl:"12" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
-}
-
-var _mSandwichUnionSize8Alignment4 = _bindings.CreateLazyMarshaler(SandwichUnionSize8Alignment4{})
-
-func (msg *SandwichUnionSize8Alignment4) Marshaler() _bindings.Marshaler {
- return _mSandwichUnionSize8Alignment4
-}
-
-type SandwichUnionSize12Alignment4 struct {
- _ struct{} `fidl:"s,20,4" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
- Before uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Union UnionSize12Alignment4 `fidl:"4" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- After uint32 `fidl:"16" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
-}
-
-var _mSandwichUnionSize12Alignment4 = _bindings.CreateLazyMarshaler(SandwichUnionSize12Alignment4{})
-
-func (msg *SandwichUnionSize12Alignment4) Marshaler() _bindings.Marshaler {
- return _mSandwichUnionSize12Alignment4
-}
-
-type StructSize16Alignment8 struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- F1 uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- F2 uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
-}
-
-var _mStructSize16Alignment8 = _bindings.CreateLazyMarshaler(StructSize16Alignment8{})
-
-func (msg *StructSize16Alignment8) Marshaler() _bindings.Marshaler {
- return _mStructSize16Alignment8
-}
-
-type SandwichUnionSize24Alignment8 struct {
- _ struct{} `fidl:"s,40,8" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
- Before uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Union UnionSize24Alignment8 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- After uint32 `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
-}
-
-var _mSandwichUnionSize24Alignment8 = _bindings.CreateLazyMarshaler(SandwichUnionSize24Alignment8{})
-
-func (msg *SandwichUnionSize24Alignment8) Marshaler() _bindings.Marshaler {
- return _mSandwichUnionSize24Alignment8
-}
-
-type SandwichUnionSize36Alignment4 struct {
- _ struct{} `fidl:"s,44,4" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
- Before uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Union UnionSize36Alignment4 `fidl:"4" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- After uint32 `fidl:"40" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
-}
-
-var _mSandwichUnionSize36Alignment4 = _bindings.CreateLazyMarshaler(SandwichUnionSize36Alignment4{})
-
-func (msg *SandwichUnionSize36Alignment4) Marshaler() _bindings.Marshaler {
- return _mSandwichUnionSize36Alignment4
-}
-
type EmptyStruct struct {
_ struct{} `fidl:"s,1,1" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
}
@@ -577,113 +475,188 @@
return _mStructOfTableWithStringAndVector
}
-type StructWithInt struct {
- _ struct{} `fidl:"s,4,4" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
- X int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+type UnionWithBoundStringStruct struct {
+ _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ V UnionWithBoundString `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
-var _mStructWithInt = _bindings.CreateLazyMarshaler(StructWithInt{})
+var _mUnionWithBoundStringStruct = _bindings.CreateLazyMarshaler(UnionWithBoundStringStruct{})
-func (msg *StructWithInt) Marshaler() _bindings.Marshaler {
- return _mStructWithInt
+func (msg *UnionWithBoundStringStruct) Marshaler() _bindings.Marshaler {
+ return _mUnionWithBoundStringStruct
}
-type StructWithArrays struct {
- _ struct{} `fidl:"s,120,8" fidl_size_v1:"120" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"120" fidl_alignment_v1_no_ee:"8"`
- ArrInt [2]int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- ArrString [2]string `fidl:"8," fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- ArrNullableString [2]*string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
- ArrStruct [2]StructWithInt `fidl:"72" fidl_offset_v1:"72" fidl_offset_v1_no_ee:"72"`
- ArrNullableStruct [2]*StructWithInt `fidl:"80" fidl_offset_v1:"80" fidl_offset_v1_no_ee:"80"`
- ArrArrInt [2][3]int32 `fidl:"96" fidl_offset_v1:"96" fidl_offset_v1_no_ee:"96"`
+type SingleVariantUnionStruct struct {
+ _ struct{} `fidl:"s,8,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ U SingleVariantUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
-var _mStructWithArrays = _bindings.CreateLazyMarshaler(StructWithArrays{})
+var _mSingleVariantUnionStruct = _bindings.CreateLazyMarshaler(SingleVariantUnionStruct{})
-func (msg *StructWithArrays) Marshaler() _bindings.Marshaler {
- return _mStructWithArrays
+func (msg *SingleVariantUnionStruct) Marshaler() _bindings.Marshaler {
+ return _mSingleVariantUnionStruct
}
-type StructWithVectors struct {
- _ struct{} `fidl:"s,112,8" fidl_size_v1:"112" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"112" fidl_alignment_v1_no_ee:"8"`
- VecEmpty []int32 `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- VecInt []int32 `fidl:"16," fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- VecString []string `fidl:"32,," fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- VecNullableString []*string `fidl:"48,," fidl_offset_v1:"48" fidl_offset_v1_no_ee:"48"`
- VecStruct []StructWithInt `fidl:"64," fidl_offset_v1:"64" fidl_offset_v1_no_ee:"64"`
- VecNullableStruct []*StructWithInt `fidl:"80," fidl_offset_v1:"80" fidl_offset_v1_no_ee:"80"`
- VecVecInt [][]int32 `fidl:"96,," fidl_offset_v1:"96" fidl_offset_v1_no_ee:"96"`
+type SandwichUnionSize8Alignment4 struct {
+ _ struct{} `fidl:"s,16,4" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
+ Before uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Value UnionSize8Alignment4 `fidl:"4" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ After uint32 `fidl:"12" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
}
-var _mStructWithVectors = _bindings.CreateLazyMarshaler(StructWithVectors{})
+var _mSandwichUnionSize8Alignment4 = _bindings.CreateLazyMarshaler(SandwichUnionSize8Alignment4{})
-func (msg *StructWithVectors) Marshaler() _bindings.Marshaler {
- return _mStructWithVectors
+func (msg *SandwichUnionSize8Alignment4) Marshaler() _bindings.Marshaler {
+ return _mSandwichUnionSize8Alignment4
}
-type I_simpleUnionTag uint32
+type SandwichUnionSize12Alignment4 struct {
+ _ struct{} `fidl:"s,20,4" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
+ Before uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Value UnionSize12Alignment4 `fidl:"4" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ After uint32 `fidl:"16" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+}
+
+var _mSandwichUnionSize12Alignment4 = _bindings.CreateLazyMarshaler(SandwichUnionSize12Alignment4{})
+
+func (msg *SandwichUnionSize12Alignment4) Marshaler() _bindings.Marshaler {
+ return _mSandwichUnionSize12Alignment4
+}
+
+type StructSize16Alignment8 struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ F1 uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ F2 uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+}
+
+var _mStructSize16Alignment8 = _bindings.CreateLazyMarshaler(StructSize16Alignment8{})
+
+func (msg *StructSize16Alignment8) Marshaler() _bindings.Marshaler {
+ return _mStructSize16Alignment8
+}
+
+type SandwichUnionSize24Alignment8 struct {
+ _ struct{} `fidl:"s,40,8" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
+ Before uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Value UnionSize24Alignment8 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ After uint32 `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+}
+
+var _mSandwichUnionSize24Alignment8 = _bindings.CreateLazyMarshaler(SandwichUnionSize24Alignment8{})
+
+func (msg *SandwichUnionSize24Alignment8) Marshaler() _bindings.Marshaler {
+ return _mSandwichUnionSize24Alignment8
+}
+
+type SandwichUnionSize36Alignment4 struct {
+ _ struct{} `fidl:"s,44,4" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
+ Before uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Value UnionSize36Alignment4 `fidl:"4" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ After uint32 `fidl:"40" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+}
+
+var _mSandwichUnionSize36Alignment4 = _bindings.CreateLazyMarshaler(SandwichUnionSize36Alignment4{})
+
+func (msg *SandwichUnionSize36Alignment4) Marshaler() _bindings.Marshaler {
+ return _mSandwichUnionSize36Alignment4
+}
+
+type Int64Struct struct {
+ _ struct{} `fidl:"s,8,8" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
+ X int64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
+
+func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
+ return _mInt64Struct
+}
+
+type TestInlineXUnionInStruct struct {
+ _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
+ Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Xu SampleXUnion `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ After string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+}
+
+var _mTestInlineXUnionInStruct = _bindings.CreateLazyMarshaler(TestInlineXUnionInStruct{})
+
+func (msg *TestInlineXUnionInStruct) Marshaler() _bindings.Marshaler {
+ return _mTestInlineXUnionInStruct
+}
+
+type TestOptionalXUnionInStruct struct {
+ _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
+ Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Xu *SampleXUnion `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ After string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+}
+
+var _mTestOptionalXUnionInStruct = _bindings.CreateLazyMarshaler(TestOptionalXUnionInStruct{})
+
+func (msg *TestOptionalXUnionInStruct) Marshaler() _bindings.Marshaler {
+ return _mTestOptionalXUnionInStruct
+}
+
+type TestStrictXUnionInStruct struct {
+ _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ Xu SampleStrictXUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mTestStrictXUnionInStruct = _bindings.CreateLazyMarshaler(TestStrictXUnionInStruct{})
+
+func (msg *TestStrictXUnionInStruct) Marshaler() _bindings.Marshaler {
+ return _mTestStrictXUnionInStruct
+}
+
+type TestFlexibleXUnionInStruct struct {
+ _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ Xu SampleXUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mTestFlexibleXUnionInStruct = _bindings.CreateLazyMarshaler(TestFlexibleXUnionInStruct{})
+
+func (msg *TestFlexibleXUnionInStruct) Marshaler() _bindings.Marshaler {
+ return _mTestFlexibleXUnionInStruct
+}
+
+type I_ipAddressConfigTag uint32
const (
- _ I_simpleUnionTag = iota
- SimpleUnionI32
- SimpleUnionI64
- SimpleUnionS
- SimpleUnionStr
+ _ I_ipAddressConfigTag = iota
+ IpAddressConfigPaddingSize24Align4
+ IpAddressConfigDhcp
)
-type SimpleUnion struct {
- I_simpleUnionTag `fidl:"u,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- I32 int32 `fidl:"1667828146"`
- I64 int64 `fidl:"1110539033"`
- S Int64Struct `fidl:"684890561"`
- Str string `fidl:"498325473,"`
+type IpAddressConfig struct {
+ I_ipAddressConfigTag `fidl:"u,28,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ PaddingSize24Align4 [6]uint32 `fidl:"1136452149"`
+ Dhcp bool `fidl:"1619238975"`
}
-func (u *SimpleUnion) Which() I_simpleUnionTag {
- return u.I_simpleUnionTag
+func (u *IpAddressConfig) Which() I_ipAddressConfigTag {
+ return u.I_ipAddressConfigTag
}
-func (u *SimpleUnion) SetI32(i32 int32) {
- u.I_simpleUnionTag = SimpleUnionI32
- u.I32 = i32
+func (u *IpAddressConfig) SetPaddingSize24Align4(paddingSize24Align4 [6]uint32) {
+ u.I_ipAddressConfigTag = IpAddressConfigPaddingSize24Align4
+ u.PaddingSize24Align4 = paddingSize24Align4
}
-func SimpleUnionWithI32(i32 int32) SimpleUnion {
- var _u SimpleUnion
- _u.SetI32(i32)
+func IpAddressConfigWithPaddingSize24Align4(paddingSize24Align4 [6]uint32) IpAddressConfig {
+ var _u IpAddressConfig
+ _u.SetPaddingSize24Align4(paddingSize24Align4)
return _u
}
-func (u *SimpleUnion) SetI64(i64 int64) {
- u.I_simpleUnionTag = SimpleUnionI64
- u.I64 = i64
+func (u *IpAddressConfig) SetDhcp(dhcp bool) {
+ u.I_ipAddressConfigTag = IpAddressConfigDhcp
+ u.Dhcp = dhcp
}
-func SimpleUnionWithI64(i64 int64) SimpleUnion {
- var _u SimpleUnion
- _u.SetI64(i64)
- return _u
-}
-
-func (u *SimpleUnion) SetS(s Int64Struct) {
- u.I_simpleUnionTag = SimpleUnionS
- u.S = s
-}
-
-func SimpleUnionWithS(s Int64Struct) SimpleUnion {
- var _u SimpleUnion
- _u.SetS(s)
- return _u
-}
-
-func (u *SimpleUnion) SetStr(str string) {
- u.I_simpleUnionTag = SimpleUnionStr
- u.Str = str
-}
-
-func SimpleUnionWithStr(str string) SimpleUnion {
- var _u SimpleUnion
- _u.SetStr(str)
+func IpAddressConfigWithDhcp(dhcp bool) IpAddressConfig {
+ var _u IpAddressConfig
+ _u.SetDhcp(dhcp)
return _u
}
@@ -727,46 +700,6 @@
return _u
}
-type I_ipAddressConfigTag uint32
-
-const (
- _ I_ipAddressConfigTag = iota
- IpAddressConfigPaddingSize24Align4
- IpAddressConfigDhcp
-)
-
-type IpAddressConfig struct {
- I_ipAddressConfigTag `fidl:"u,28,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- PaddingSize24Align4 [6]uint32 `fidl:"1136452149"`
- Dhcp bool `fidl:"1619238975"`
-}
-
-func (u *IpAddressConfig) Which() I_ipAddressConfigTag {
- return u.I_ipAddressConfigTag
-}
-
-func (u *IpAddressConfig) SetPaddingSize24Align4(paddingSize24Align4 [6]uint32) {
- u.I_ipAddressConfigTag = IpAddressConfigPaddingSize24Align4
- u.PaddingSize24Align4 = paddingSize24Align4
-}
-
-func IpAddressConfigWithPaddingSize24Align4(paddingSize24Align4 [6]uint32) IpAddressConfig {
- var _u IpAddressConfig
- _u.SetPaddingSize24Align4(paddingSize24Align4)
- return _u
-}
-
-func (u *IpAddressConfig) SetDhcp(dhcp bool) {
- u.I_ipAddressConfigTag = IpAddressConfigDhcp
- u.Dhcp = dhcp
-}
-
-func IpAddressConfigWithDhcp(dhcp bool) IpAddressConfig {
- var _u IpAddressConfig
- _u.SetDhcp(dhcp)
- return _u
-}
-
type I_unionWithBoundStringTag uint32
const (
@@ -1072,6 +1005,109 @@
return _u
}
+type I_simpleUnionTag uint32
+
+const (
+ _ I_simpleUnionTag = iota
+ SimpleUnionI32
+ SimpleUnionI64
+ SimpleUnionS
+ SimpleUnionStr
+)
+
+type SimpleUnion struct {
+ I_simpleUnionTag `fidl:"u,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ I32 int32 `fidl:"1667828146"`
+ I64 int64 `fidl:"1110539033"`
+ S Int64Struct `fidl:"684890561"`
+ Str string `fidl:"498325473,"`
+}
+
+func (u *SimpleUnion) Which() I_simpleUnionTag {
+ return u.I_simpleUnionTag
+}
+
+func (u *SimpleUnion) SetI32(i32 int32) {
+ u.I_simpleUnionTag = SimpleUnionI32
+ u.I32 = i32
+}
+
+func SimpleUnionWithI32(i32 int32) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetI32(i32)
+ return _u
+}
+
+func (u *SimpleUnion) SetI64(i64 int64) {
+ u.I_simpleUnionTag = SimpleUnionI64
+ u.I64 = i64
+}
+
+func SimpleUnionWithI64(i64 int64) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetI64(i64)
+ return _u
+}
+
+func (u *SimpleUnion) SetS(s Int64Struct) {
+ u.I_simpleUnionTag = SimpleUnionS
+ u.S = s
+}
+
+func SimpleUnionWithS(s Int64Struct) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetS(s)
+ return _u
+}
+
+func (u *SimpleUnion) SetStr(str string) {
+ u.I_simpleUnionTag = SimpleUnionStr
+ u.Str = str
+}
+
+func SimpleUnionWithStr(str string) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetStr(str)
+ return _u
+}
+
+type I_xUnionWithEmptyStructTag uint32
+
+const (
+ XUnionWithEmptyStruct_unknownData = 0 // 0x00000000
+ XUnionWithEmptyStructS = 1956241662 // 0x7499e0fe
+)
+
+type XUnionWithEmptyStruct struct {
+ I_xUnionWithEmptyStructTag `fidl:"x,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ I_unknownData []byte
+ S EmptyStruct `fidl:"1956241662"`
+}
+
+func (_m *XUnionWithEmptyStruct) Which() I_xUnionWithEmptyStructTag {
+ switch _m.I_xUnionWithEmptyStructTag {
+ case 1956241662:
+ return XUnionWithEmptyStructS
+ default:
+ return XUnionWithEmptyStruct_unknownData
+ }
+}
+
+func (_m *XUnionWithEmptyStruct) Ordinal() uint32 {
+ return uint32(_m.I_xUnionWithEmptyStructTag)
+}
+
+func (_m *XUnionWithEmptyStruct) SetS(s EmptyStruct) {
+ _m.I_xUnionWithEmptyStructTag = XUnionWithEmptyStructS
+ _m.S = s
+}
+
+func XUnionWithEmptyStructWithS(s EmptyStruct) XUnionWithEmptyStruct {
+ var _u XUnionWithEmptyStruct
+ _u.SetS(s)
+ return _u
+}
+
type I_sampleXUnionTag uint32
const (
@@ -1195,73 +1231,6 @@
return _u
}
-type I_xUnionWithEmptyStructTag uint32
-
-const (
- XUnionWithEmptyStruct_unknownData = 0 // 0x00000000
- XUnionWithEmptyStructS = 1956241662 // 0x7499e0fe
-)
-
-type XUnionWithEmptyStruct struct {
- I_xUnionWithEmptyStructTag `fidl:"x,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- I_unknownData []byte
- S EmptyStruct `fidl:"1956241662"`
-}
-
-func (_m *XUnionWithEmptyStruct) Which() I_xUnionWithEmptyStructTag {
- switch _m.I_xUnionWithEmptyStructTag {
- case 1956241662:
- return XUnionWithEmptyStructS
- default:
- return XUnionWithEmptyStruct_unknownData
- }
-}
-
-func (_m *XUnionWithEmptyStruct) Ordinal() uint32 {
- return uint32(_m.I_xUnionWithEmptyStructTag)
-}
-
-func (_m *XUnionWithEmptyStruct) SetS(s EmptyStruct) {
- _m.I_xUnionWithEmptyStructTag = XUnionWithEmptyStructS
- _m.S = s
-}
-
-func XUnionWithEmptyStructWithS(s EmptyStruct) XUnionWithEmptyStruct {
- var _u XUnionWithEmptyStruct
- _u.SetS(s)
- return _u
-}
-
-type TableWithEmptyStruct struct {
- _ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- S EmptyStruct `fidl:"1"`
- SPresent bool
-}
-
-func (u *TableWithEmptyStruct) SetS(s EmptyStruct) {
- u.S = s
- u.SPresent = true
-}
-
-func (u *TableWithEmptyStruct) GetS() EmptyStruct {
- return u.S
-}
-
-func (u *TableWithEmptyStruct) GetSWithDefault(_default EmptyStruct) EmptyStruct {
- if !u.HasS() {
- return _default
- }
- return u.S
-}
-
-func (u *TableWithEmptyStruct) HasS() bool {
- return u.SPresent
-}
-
-func (u *TableWithEmptyStruct) ClearS() {
- u.SPresent = false
-}
-
type XUnionInTable struct {
_ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
Before string `fidl:"1,"`
@@ -1344,6 +1313,36 @@
u.AfterPresent = false
}
+type TableWithEmptyStruct struct {
+ _ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ S EmptyStruct `fidl:"1"`
+ SPresent bool
+}
+
+func (u *TableWithEmptyStruct) SetS(s EmptyStruct) {
+ u.S = s
+ u.SPresent = true
+}
+
+func (u *TableWithEmptyStruct) GetS() EmptyStruct {
+ return u.S
+}
+
+func (u *TableWithEmptyStruct) GetSWithDefault(_default EmptyStruct) EmptyStruct {
+ if !u.HasS() {
+ return _default
+ }
+ return u.S
+}
+
+func (u *TableWithEmptyStruct) HasS() bool {
+ return u.SPresent
+}
+
+func (u *TableWithEmptyStruct) ClearS() {
+ u.SPresent = false
+}
+
type SimpleTable struct {
_ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
X int64 `fidl:"1"`
diff --git a/src/syscall/zx/fidl/fidl_test/conformance_test.go b/src/syscall/zx/fidl/fidl_test/conformance_test.go
index 3c0b58f..5246cd5 100644
--- a/src/syscall/zx/fidl/fidl_test/conformance_test.go
+++ b/src/syscall/zx/fidl/fidl_test/conformance_test.go
@@ -1646,7 +1646,7 @@
v3 := conformance.UnionSize8Alignment4{}
var v4 uint32 = 4
v3.SetVariant(v4)
- v1.Union = v3
+ v1.Value = v3
var v5 uint32 = 20
v1.After = v5
@@ -1671,7 +1671,7 @@
v3 := conformance.UnionSize8Alignment4{}
var v4 uint32 = 4
v3.SetVariant(v4)
- v1.Union = v3
+ v1.Value = v3
var v5 uint32 = 20
v1.After = v5
@@ -1706,7 +1706,7 @@
var v9 uint8 = 6
v10 := [6]uint8{v4, v5, v6, v7, v8, v9}
v3.SetVariant(v10)
- v1.Union = v3
+ v1.Value = v3
var v11 uint32 = 20
v1.After = v11
@@ -1738,7 +1738,7 @@
var v9 uint8 = 6
v10 := [6]uint8{v4, v5, v6, v7, v8, v9}
v3.SetVariant(v10)
- v1.Union = v3
+ v1.Value = v3
var v11 uint32 = 20
v1.After = v11
@@ -1771,7 +1771,7 @@
var v6 uint64 = 2
v4.F2 = v6
v3.SetVariant(v4)
- v1.Union = v3
+ v1.Value = v3
var v7 uint32 = 20
v1.After = v7
@@ -1803,7 +1803,7 @@
var v6 uint64 = 2
v4.F2 = v6
v3.SetVariant(v4)
- v1.Union = v3
+ v1.Value = v3
var v7 uint32 = 20
v1.After = v7
@@ -1865,7 +1865,7 @@
var v35 uint8 = 32
v36 := [32]uint8{v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35}
v3.SetVariant(v36)
- v1.Union = v3
+ v1.Value = v3
var v37 uint32 = 20
v1.After = v37
@@ -1926,7 +1926,7 @@
var v35 uint8 = 32
v36 := [32]uint8{v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35}
v3.SetVariant(v36)
- v1.Union = v3
+ v1.Value = v3
var v37 uint32 = 20
v1.After = v37
@@ -3582,7 +3582,7 @@
v3 := conformance.UnionSize8Alignment4{}
var v4 uint32 = 4
v3.SetVariant(v4)
- v1.Union = v3
+ v1.Value = v3
var v5 uint32 = 20
v1.After = v5
@@ -3607,7 +3607,7 @@
v3 := conformance.UnionSize8Alignment4{}
var v4 uint32 = 4
v3.SetVariant(v4)
- v1.Union = v3
+ v1.Value = v3
var v5 uint32 = 20
v1.After = v5
@@ -3642,7 +3642,7 @@
var v9 uint8 = 6
v10 := [6]uint8{v4, v5, v6, v7, v8, v9}
v3.SetVariant(v10)
- v1.Union = v3
+ v1.Value = v3
var v11 uint32 = 20
v1.After = v11
@@ -3674,7 +3674,7 @@
var v9 uint8 = 6
v10 := [6]uint8{v4, v5, v6, v7, v8, v9}
v3.SetVariant(v10)
- v1.Union = v3
+ v1.Value = v3
var v11 uint32 = 20
v1.After = v11
@@ -3707,7 +3707,7 @@
var v6 uint64 = 2
v4.F2 = v6
v3.SetVariant(v4)
- v1.Union = v3
+ v1.Value = v3
var v7 uint32 = 20
v1.After = v7
@@ -3739,7 +3739,7 @@
var v6 uint64 = 2
v4.F2 = v6
v3.SetVariant(v4)
- v1.Union = v3
+ v1.Value = v3
var v7 uint32 = 20
v1.After = v7
@@ -3801,7 +3801,7 @@
var v35 uint8 = 32
v36 := [32]uint8{v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35}
v3.SetVariant(v36)
- v1.Union = v3
+ v1.Value = v3
var v37 uint32 = 20
v1.After = v37
@@ -3862,7 +3862,7 @@
var v35 uint8 = 32
v36 := [32]uint8{v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35}
v3.SetVariant(v36)
- v1.Union = v3
+ v1.Value = v3
var v37 uint32 = 20
v1.After = v37
diff --git a/src/syscall/zx/fidl/fidl_test/encoding_new_test.go b/src/syscall/zx/fidl/fidl_test/encoding_new_test.go
index eb19a3f..3e428be 100644
--- a/src/syscall/zx/fidl/fidl_test/encoding_new_test.go
+++ b/src/syscall/zx/fidl/fidl_test/encoding_new_test.go
@@ -8,7 +8,6 @@
import (
"bytes"
- "encoding/binary"
"fmt"
"math/rand"
"reflect"
@@ -891,14 +890,6 @@
if _, _, err := MarshalHeaderThenMessage(&inHeader, &input, respb[:], resph[:]); err != nil {
t.Fatalf("error marshaling: %v\n", err)
}
- // Set the ordinal value to the value in XUnion1AsUnionStruct, since it is
- // a different type.
- // This value comes from bindingstest/impl.go
- const bodyStart = 16
- respb[bodyStart+0] = 0x24
- respb[bodyStart+1] = 0x94
- respb[bodyStart+2] = 0x6a
- respb[bodyStart+3] = 0x3e
var union XUnion1AsUnionStruct
var outHeader MessageHeader
if err := UnmarshalHeaderThenMessage(respb[:], nil, &outHeader, &union); err != nil {
@@ -931,27 +922,11 @@
name: "XUnion1AsUnion",
xunionInput: &XUnion1Struct{Xu: XUnion1WithD(2)},
unionInput: &XUnion1AsUnionStruct{Xuau: XUnion1AsUnionWithD(2)},
- ordinalSubstitutions: []ordinalSubstitution{
- {
- position: 0,
- unionOrdinal: 1047172132,
- },
- },
},
{
name: "UnionInsideUnion",
xunionInput: &XUnionInsideXUnionStruct{U: XUnionInsideXUnionWithB(XUnion1WithD(2))},
unionInput: &UnionInsideUnionStruct{U: UnionInsideUnionWithB(XUnion1AsUnionWithD(2))},
- ordinalSubstitutions: []ordinalSubstitution{
- {
- position: 0,
- unionOrdinal: 340650192,
- },
- {
- position: 24,
- unionOrdinal: 1047172132,
- },
- },
},
}
@@ -964,9 +939,6 @@
if err != nil {
t.Fatalf("error marshaling: %v\n", err)
}
- for _, sub := range tc.ordinalSubstitutions {
- binary.LittleEndian.PutUint32(xunionRespb[sub.position:sub.position+4], sub.unionOrdinal)
- }
var unionRespb [zx.ChannelMaxMessageBytes]byte
var unionResph [zx.ChannelMaxMessageHandles]zx.Handle
@@ -992,9 +964,6 @@
if err != nil {
t.Fatalf("error marshaling: %v\n", err)
}
- for _, sub := range tc.ordinalSubstitutions {
- binary.LittleEndian.PutUint32(respb[sub.position:sub.position+4], sub.unionOrdinal)
- }
ctx := MarshalerContext{DecodeUnionsFromXUnionBytes: true}
result := reflect.New(reflect.TypeOf(tc.unionInput).Elem()).Interface().(Message)
diff --git a/src/syscall/zx/io/impl.go b/src/syscall/zx/io/impl.go
index 8faa3fb..cee9216 100644
--- a/src/syscall/zx/io/impl.go
+++ b/src/syscall/zx/io/impl.go
@@ -556,7 +556,7 @@
}
type nodeOnOpenResponse struct {
- _ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
+ _ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
Info *NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
@@ -1025,7 +1025,7 @@
}
type fileOnOpenResponse struct {
- _ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
+ _ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
Info *NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
@@ -2039,7 +2039,7 @@
}
type directoryOnOpenResponse struct {
- _ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
+ _ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
Info *NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
@@ -3066,7 +3066,7 @@
}
type directoryAdminOnOpenResponse struct {
- _ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
+ _ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
Info *NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
diff --git a/src/syscall/zx/net/impl.go b/src/syscall/zx/net/impl.go
index 00d2d84..42b3885 100644
--- a/src/syscall/zx/net/impl.go
+++ b/src/syscall/zx/net/impl.go
@@ -88,7 +88,7 @@
}
type controlOnOpenResponse struct {
- _ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
+ _ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
Info *fuchsiaio.NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}