Skip to content

Commit 4cfef36

Browse files
committed
Support newer Emscripten which droppped Pointer_stringify in favour of UTF8ToString
1 parent 013ce4b commit 4cfef36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wrapper.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ function setupMethods (soljson) {
3535
soljson.setValue(ptr, buffer, '*');
3636
};
3737

38-
var copyFromCString = function (ptr) {
39-
return soljson.Pointer_stringify(ptr);
40-
}
38+
// This is to support multiple versions of Emscripten.
39+
// Take a single `ptr` and returns a `str`.
40+
var copyFromCString = soljson.UTF8ToString || soljson.Pointer_stringify;
4141

4242
var wrapCallback = function (callback) {
4343
assert(typeof callback === 'function', 'Invalid callback specified.');

0 commit comments

Comments
 (0)