Skip to content

Commit

Permalink
s/take_handle/release_handle/g
Browse files Browse the repository at this point in the history
  • Loading branch information
mrolig5267319 committed Feb 21, 2024
1 parent 24dcf8c commit a8b4e2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/include/emscripten/val.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class val {
}

// Takes ownership of the handle away from, and invalidates, this instance.
EM_VAL take_handle() {
EM_VAL release_handle() {
EM_VAL taken = as_handle();
handle = 0;
return taken;
Expand Down Expand Up @@ -806,7 +806,7 @@ struct BindingType<T, typename std::enable_if<std::is_base_of<val, T>::value &&
// Marshall to JS with move semantics when we can invalidate the temporary val
// object.
static WireType toWireType(val&& v) {
return v.take_handle();
return v.release_handle();
}

// Marshal to JS with copy semantics when we cannot transfer the val objects
Expand Down

0 comments on commit a8b4e2a

Please sign in to comment.