Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global API #1

Merged
merged 1 commit into from
Oct 20, 2020
Merged

Global API #1

merged 1 commit into from
Oct 20, 2020

Conversation

jubianchi
Copy link

@jubianchi jubianchi commented Oct 16, 2020

wasmer/global.go Outdated Show resolved Hide resolved
wasmer/global.go Outdated
panic(err.Error())
}

C.wasm_global_set(self.inner(), &wasmValue)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our implementation will panic (with unwrap) in case of an error. That's probably something we want to fix! Can you submit a patch to fix that on wasmerio/wasmer please?

func (self *Global) Get() (interface{}, error) {
var value C.wasm_val_t

C.wasm_global_get(self.inner(), &value)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, our implementation will panic and we must fix that too.

@Hywan Hywan marked this pull request as ready for review October 20, 2020 14:32
@Hywan Hywan merged commit 2dbe7ad into Hywan:reboot Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants