Skip to content

Commit

Permalink
Merge pull request #16 from ekharkunov/emscripten-update
Browse files Browse the repository at this point in the history
Update according to new emscripten version. Replace deprecated APIs.
  • Loading branch information
AGulev authored Apr 10, 2024
2 parents d6bee23 + ea456fb commit ca244c6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions poki-sdk/lib/web/lib_pokisdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ var LibPokiSdk = {
},

_shareableURLCallback: function(url) {
var url_arr = intArrayFromString(url, true);
var _url = allocate(url_arr, ALLOC_NORMAL);
{{{ makeDynCall("vii", "PokiSdk._urlCallback")}}}(_url, url_arr.length);
var _url = stringToNewUTF8(url);
{{{ makeDynCall("vii", "PokiSdk._urlCallback")}}}(_url, lengthBytesUTF8(url));
Module._free(_url);
}
},
Expand Down Expand Up @@ -83,9 +82,9 @@ var LibPokiSdk = {
PokiSdkJs_GetURLParam: function(key) {
var key = UTF8ToString(key);
var value = PokiSDK.getURLParam(key);
return allocate(intArrayFromString(value), ALLOC_STACK);
return stringToUTF8OnStack(value);
}
}

autoAddDeps(LibPokiSdk, '$PokiSdk');
mergeInto(LibraryManager.library, LibPokiSdk);
addToLibrary(LibPokiSdk);

0 comments on commit ca244c6

Please sign in to comment.