From d2eef397312d1c142d95c2aef0ff3d5aeee6495a Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 8 May 2020 16:55:01 +0200 Subject: Fix Closure compiler build, python style. Move copyToFS into utils.js library included with '--pre-js'. --- modules/webrtc/webrtc_data_channel_js.cpp | 6 +++--- modules/websocket/emws_client.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/webrtc/webrtc_data_channel_js.cpp b/modules/webrtc/webrtc_data_channel_js.cpp index 1b360720a2..40c3f5801b 100644 --- a/modules/webrtc/webrtc_data_channel_js.cpp +++ b/modules/webrtc/webrtc_data_channel_js.cpp @@ -312,14 +312,14 @@ WebRTCDataChannelJS::WebRTCDataChannelJS(int js_id) { return; } var len = buffer.length*buffer.BYTES_PER_ELEMENT; - var out = Module._malloc(len); - Module.HEAPU8.set(buffer, out); + var out = _malloc(len); + HEAPU8.set(buffer, out); ccall("_emrtc_on_ch_message", "void", ["number", "number", "number", "number"], [c_ptr, out, len, is_string] ); - Module._free(out); + _free(out); } }, this, js_id); diff --git a/modules/websocket/emws_client.cpp b/modules/websocket/emws_client.cpp index bbe4d6dc5b..bceb65c315 100644 --- a/modules/websocket/emws_client.cpp +++ b/modules/websocket/emws_client.cpp @@ -142,14 +142,14 @@ Error EMWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port, } var len = buffer.length*buffer.BYTES_PER_ELEMENT; - var out = Module._malloc(len); - Module.HEAPU8.set(buffer, out); + var out = _malloc(len); + HEAPU8.set(buffer, out); ccall("_esws_on_message", "void", ["number", "number", "number", "number"], [c_ptr, out, len, is_string] ); - Module._free(out); + _free(out); }); socket.addEventListener("error", function (event) { -- cgit v1.2.3