summaryrefslogtreecommitdiff
path: root/modules/mono/glue
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-18 11:27:04 +0100
committerGitHub <noreply@github.com>2020-02-18 11:27:04 +0100
commitef5891091bceef2800b4fae4cd85af219e791467 (patch)
tree8d58cca8cae2c34d408450cfb5ceb198543147b7 /modules/mono/glue
parentc7faf2e16b684f3dd0246dbdb662b1826dd24571 (diff)
parent3205a92ad872f918c8322cdcd1434c231a1fd251 (diff)
Merge pull request #36311 from reduz/poolvector-deprecation
Convert all references and instances of PoolVector to Vector
Diffstat (limited to 'modules/mono/glue')
-rw-r--r--modules/mono/glue/gd_glue.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/mono/glue/gd_glue.cpp b/modules/mono/glue/gd_glue.cpp
index 17483c4457..ce81ea391d 100644
--- a/modules/mono/glue/gd_glue.cpp
+++ b/modules/mono/glue/gd_glue.cpp
@@ -44,8 +44,8 @@
MonoObject *godot_icall_GD_bytes2var(MonoArray *p_bytes, MonoBoolean p_allow_objects) {
Variant ret;
- PoolByteArray varr = GDMonoMarshal::mono_array_to_PoolByteArray(p_bytes);
- PoolByteArray::Read r = varr.read();
+ PackedByteArray varr = GDMonoMarshal::mono_array_to_PackedByteArray(p_bytes);
+ const uint8_t *r = varr.ptr();
Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, p_allow_objects);
if (err != OK) {
ret = RTR("Not enough bytes for decoding bytes, or invalid format.");
@@ -257,18 +257,18 @@ void godot_icall_GD_pushwarning(MonoString *p_str) {
MonoArray *godot_icall_GD_var2bytes(MonoObject *p_var, MonoBoolean p_full_objects) {
Variant var = GDMonoMarshal::mono_object_to_variant(p_var);
- PoolByteArray barr;
+ PackedByteArray barr;
int len;
Error err = encode_variant(var, NULL, len, p_full_objects);
ERR_FAIL_COND_V_MSG(err != OK, NULL, "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID).");
barr.resize(len);
{
- PoolByteArray::Write w = barr.write();
+ uint8_t *w = barr.ptrw();
encode_variant(var, w.ptr(), len, p_full_objects);
}
- return GDMonoMarshal::PoolByteArray_to_mono_array(barr);
+ return GDMonoMarshal::PackedByteArray_to_mono_array(barr);
}
MonoString *godot_icall_GD_var2str(MonoObject *p_var) {