Skip to content

Commit

Permalink
Use __wbg_ptr instead of ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Oct 4, 2023
1 parent aa83e9a commit 2145fc4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kimchi/js/bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ var js_class_vector_to_rust_vector = function (v) {
for (var i = 0; i < len; i++) {
// Beware: caller may need to do finalizer things to avoid these
// pointers disappearing out from under us.
res[i] = v[i].ptr;
res[i] = v[i].__wbg_ptr;
}
return res;
};
Expand Down Expand Up @@ -586,7 +586,7 @@ var free_on_finalize = function (x) {
// directly, but unfortunately the destructor name is some mangled internal
// string generated by wasm_bindgen. For now, this is the best,
// least-brittle way to free once the original class instance gets collected.
var instance_representative = x.constructor.__wrap(x.ptr);
var instance_representative = x.constructor.__wrap(x.__wbg_ptr);
free_finalization_registry.register(x, instance_representative, x);
return x;
};
Expand Down Expand Up @@ -1879,7 +1879,7 @@ function index_term_of_rust(term, token_class) {
// Provides: wrap
function wrap(ptr, klass) {
var obj = Object.create(klass.prototype);
obj.ptr = ptr;
obj.__wbg_ptr= ptr;
return obj;
}

Expand Down

0 comments on commit 2145fc4

Please sign in to comment.