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

Add the wasmtime::Ref::null constructor and use it in a few places #8492

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Apr 26, 2024

Just a small follow up to #8481

@fitzgen fitzgen requested a review from a team as a code owner April 26, 2024 17:31
@fitzgen fitzgen requested review from alexcrichton and removed request for a team April 26, 2024 17:31
Comment on lines -81 to +83
pub fn null_ref(heap_type: HeapType) -> Val {
match heap_type.top() {
HeapType::Func => Val::FuncRef(None),
HeapType::Extern => Val::ExternRef(None),
HeapType::Any => Val::AnyRef(None),
_ => unreachable!(),
}
#[inline]
pub fn null_ref(heap_type: &HeapType) -> Val {
Ref::null(&heap_type).into()
Copy link
Member Author

Choose a reason for hiding this comment

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

turns out I even added Val::null_ref previously lol

@github-actions github-actions bot added fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:c-api Issues pertaining to the C API. labels Apr 26, 2024
Copy link

Subscribe to Label Action

cc @fitzgen

This issue or pull request has been labeled: "fuzzing", "wasmtime:api", "wasmtime:c-api"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton added this pull request to the merge queue Apr 27, 2024
Merged via the queue into bytecodealliance:main with commit 6232904 Apr 27, 2024
23 checks passed
@fitzgen fitzgen deleted the ref-null-ctor branch April 29, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:c-api Issues pertaining to the C API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants