Holds wasm.Code as values on wasm.Module (#1243)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
@@ -20,7 +20,7 @@ func StubFunction(name string) *wasm.HostFunc {
|
||||
Name: name,
|
||||
ParamTypes: []wasm.ValueType{wasm.ValueTypeI32},
|
||||
ParamNames: []string{"sp"},
|
||||
Code: &wasm.Code{GoFunc: api.GoModuleFunc(func(ctx context.Context, _ api.Module, stack []uint64) {})},
|
||||
Code: wasm.Code{GoFunc: api.GoModuleFunc(func(ctx context.Context, _ api.Module, stack []uint64) {})},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,6 @@ func NewFunc(name string, goFunc api.GoModuleFunc) *wasm.HostFunc {
|
||||
Name: name,
|
||||
ParamTypes: []api.ValueType{api.ValueTypeI32},
|
||||
ParamNames: []string{"sp"},
|
||||
Code: &wasm.Code{GoFunc: goFunc},
|
||||
Code: wasm.Code{GoFunc: goFunc},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user