Created
January 9, 2017 00:14
-
-
Save zzarcon/8d15dd9da9c39a15c254fceb0a6578d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($0) {var stack = Runtime.stackSave();var str = $0;var ret = 0; | |
if (str !== null && str !== undefined && str !== 0) { // null string | |
// at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' | |
var len = (str.length << 2) + 1; | |
ret = Runtime.stackAlloc(len); | |
stringToUTF8(str, ret, len); | |
};$0=(ret);var ret = cfunc($0);if (typeof EmterpreterAsync === 'object') { assert(!EmterpreterAsync.state, 'cannot start async op with normal JS calling cwrap') }Runtime.stackRestore(stack);return ret}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment