Skip to content

Commit 4f8520c

Browse files
committed
Use atree for struct values
1 parent cc67b57 commit 4f8520c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interpreter/encode.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ const (
666666
encodedAddressLocationLength = 2
667667
)
668668

669-
func encodeLocation(e *cbor.StreamEncoder, l common.Location) error {
669+
func EncodeLocation(e *cbor.StreamEncoder, l common.Location) error {
670670
if l == nil {
671671
return e.EncodeNil()
672672
}
@@ -1033,7 +1033,7 @@ func (t *CompositeStaticType) Encode(e *cbor.StreamEncoder) error {
10331033
}
10341034

10351035
// Encode location at array index encodedCompositeStaticTypeLocationFieldKey
1036-
err = encodeLocation(e, t.Location)
1036+
err = EncodeLocation(e, t.Location)
10371037
if err != nil {
10381038
return err
10391039
}
@@ -1076,7 +1076,7 @@ func (t *InterfaceStaticType) Encode(e *cbor.StreamEncoder) error {
10761076
}
10771077

10781078
// Encode location at array index encodedInterfaceStaticTypeLocationFieldKey
1079-
err = encodeLocation(e, t.Location)
1079+
err = EncodeLocation(e, t.Location)
10801080
if err != nil {
10811081
return err
10821082
}
@@ -1450,7 +1450,7 @@ func (c compositeTypeInfo) Encode(e *cbor.StreamEncoder) error {
14501450
return err
14511451
}
14521452

1453-
err = encodeLocation(e, c.location)
1453+
err = EncodeLocation(e, c.location)
14541454
if err != nil {
14551455
return err
14561456
}

0 commit comments

Comments
 (0)