summaryrefslogtreecommitdiff
path: root/platform/javascript/javascript_eval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/javascript_eval.cpp')
-rw-r--r--platform/javascript/javascript_eval.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/javascript/javascript_eval.cpp b/platform/javascript/javascript_eval.cpp
index d907222d24..ab045d359b 100644
--- a/platform/javascript/javascript_eval.cpp
+++ b/platform/javascript/javascript_eval.cpp
@@ -33,7 +33,7 @@
#include "api/javascript_eval.h"
#include "emscripten.h"
-extern "C" EMSCRIPTEN_KEEPALIVE uint8_t *resize_poolbytearray_and_open_write(PoolByteArray *p_arr, PoolByteArray::Write *r_write, int p_len) {
+extern "C" EMSCRIPTEN_KEEPALIVE uint8_t *resize_PackedByteArray_and_open_write(PackedByteArray *p_arr, uint8_t **r_write, int p_len) {
p_arr->resize(p_len);
*r_write = p_arr->write();
@@ -48,8 +48,8 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
char *s;
} js_data;
- PoolByteArray arr;
- PoolByteArray::Write arr_write;
+ PackedByteArray arr;
+ uint8_t *arr_write;
/* clang-format off */
Variant::Type return_type = static_cast<Variant::Type>(EM_ASM_INT({
@@ -114,9 +114,9 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
eval_ret = new Uint8Array(eval_ret);
}
if (eval_ret instanceof Uint8Array) {
- var bytes_ptr = ccall('resize_poolbytearray_and_open_write', 'number', ['number', 'number' ,'number'], [BYTEARRAY_PTR, BYTEARRAY_WRITE_PTR, eval_ret.length]);
+ var bytes_ptr = ccall('resize_PackedByteArray_and_open_write', 'number', ['number', 'number' ,'number'], [BYTEARRAY_PTR, BYTEARRAY_WRITE_PTR, eval_ret.length]);
HEAPU8.set(eval_ret, bytes_ptr);
- return 20; // POOL_BYTE_ARRAY
+ return 20; // PACKED_BYTE_ARRAY
}
break;
}
@@ -137,8 +137,8 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
/* clang-format on */
return str;
}
- case Variant::POOL_BYTE_ARRAY:
- arr_write = PoolByteArray::Write();
+ case Variant::PACKED_BYTE_ARRAY:
+ arr_write = uint8_t * ();
return arr;
default:
return Variant();