Skip to content

Commit 831ae36

Browse files
committed
wit: update links to element size documentation
1 parent fe341ee commit 831ae36

13 files changed

Lines changed: 14 additions & 14 deletions

File tree

wit/abi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// [Canonical ABI] [size], [alignment], and [flat] representation.
1010
//
1111
// [Canonical ABI]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md
12-
// [size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
12+
// [size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
1313
// [alignment]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#alignment
1414
// [flat]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#flattening
1515
type ABI interface {

wit/enum.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (e *Enum) Despecialize() TypeDefKind {
2929
// type that can represent 0...len(e.Cases).
3030
// It is first [despecialized] into a [Variant] with no associated types, then sized.
3131
//
32-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
32+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
3333
// [despecialized]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#despecialization
3434
func (e *Enum) Size() uintptr {
3535
return e.Despecialize().Size()

wit/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Flags struct {
1111

1212
// Size returns the [ABI byte size] of [Flags] f.
1313
//
14-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
14+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
1515
func (f *Flags) Size() uintptr {
1616
n := len(f.Flags)
1717
switch {

wit/future.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Future struct {
1212

1313
// Size returns the [ABI byte size] for a [Future].
1414
//
15-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
15+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
1616
func (*Future) Size() uintptr { return 4 }
1717

1818
// Align returns the [ABI byte alignment] a [Future].

wit/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type List struct {
1111

1212
// Size returns the [ABI byte size] for a [List].
1313
//
14-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
14+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
1515
func (*List) Size() uintptr { return 8 } // [2]int32
1616

1717
// Align returns the [ABI byte alignment] a [List].

wit/option.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (o *Option) Despecialize() TypeDefKind {
2727
// Size returns the [ABI byte size] for [Option] o.
2828
// It is first [despecialized] into a [Variant] with two cases, "none" and "some(T)", then sized.
2929
//
30-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
30+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
3131
// [despecialized]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#despecialization
3232
func (o *Option) Size() uintptr {
3333
return o.Despecialize().Size()

wit/pointer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Pointer struct {
1414

1515
// Size returns the [ABI byte size] for [Pointer].
1616
//
17-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
17+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
1818
func (*Pointer) Size() uintptr { return 4 }
1919

2020
// Align returns the [ABI byte alignment] for [Pointer].

wit/record.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Record struct {
1111

1212
// Size returns the [ABI byte size] for [Record] r.
1313
//
14-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
14+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
1515
func (r *Record) Size() uintptr {
1616
var s uintptr
1717
for _, f := range r.Fields {

wit/resource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Resource struct{ _typeDefKind }
88

99
// Size returns the [ABI byte size] for [Resource].
1010
//
11-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
11+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
1212
func (*Resource) Size() uintptr { return 4 }
1313

1414
// Align returns the [ABI byte alignment] for [Resource].
@@ -45,7 +45,7 @@ func (_handle) isHandle() {}
4545

4646
// Size returns the [ABI byte size] for this [Handle].
4747
//
48-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
48+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
4949
func (_handle) Size() uintptr { return 4 }
5050

5151
// Align returns the [ABI byte alignment] for this [Handle].

wit/result.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (r *Result) Types() []Type {
4040
// Size returns the [ABI byte size] for [Result] r.
4141
// It is first [despecialized] into a [Variant] with two cases "ok" and "error", then sized.
4242
//
43-
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
43+
// [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element-size
4444
// [despecialized]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#despecialization
4545
func (r *Result) Size() uintptr {
4646
return r.Despecialize().Size()

0 commit comments

Comments
 (0)