comparison test/quick-test.js @ 176:eaf46e7647a0 tip master

Update for latest Emscripten - Pointer_stringify has apparently been deprecated for a while, and was removed in v1.38.27
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 27 Feb 2019 11:29:53 +0000
parents a91b4defa581
children
comparison
equal deleted inserted replaced
175:a91b4defa581 176:eaf46e7647a0
41 // (though the docs don't mention this). Note the *Cstr 41 // (though the docs don't mention this). Note the *Cstr
42 // values are Emscripten heap pointers 42 // values are Emscripten heap pointers
43 var inCstr = m.allocate(m.intArrayFromString(jsonStr), 'i8', m.ALLOC_NORMAL); 43 var inCstr = m.allocate(m.intArrayFromString(jsonStr), 'i8', m.ALLOC_NORMAL);
44 var outCstr = piperRequestJson(inCstr); 44 var outCstr = piperRequestJson(inCstr);
45 m._free(inCstr); 45 m._free(inCstr);
46 var result = m.Pointer_stringify(outCstr); 46 var result = m.UTF8ToString(outCstr);
47 piperFreeJson(outCstr); 47 piperFreeJson(outCstr);
48 note("Returned JSON = " + result); 48 note("Returned JSON = " + result);
49 return result; 49 return result;
50 } 50 }
51 51