mirror of
https://github.com/godotengine/godot.git
synced 2025-10-30 05:01:10 +00:00
PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
This commit is contained in:
parent
fb8c93c10b
commit
3205a92ad8
406 changed files with 5314 additions and 8271 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue