1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-04 01:23:21 +00:00

1. Added DynamicBuffer support

2. Changed MemoryStream to use DynamicBuffer instead of native buffer, fixing smbios issue on linux
This commit is contained in:
Bryan Roe
2020-08-07 10:40:52 -07:00
parent c9aaeecca5
commit 1ffe14f22c
3 changed files with 25 additions and 28 deletions

View File

@@ -51,6 +51,12 @@ typedef struct Duktape_EventLoopDispatchData
void *user;
}Duktape_EventLoopDispatchData;
void* Duktape_DynamicBuffer_Resize(duk_context *ctx, duk_idx_t idx, duk_size_t bufSize)
{
void *buffer = ILibMemory_FromRaw(duk_resize_buffer(ctx, idx, bufSize + sizeof(ILibMemory_Header)));
ILibMemory_Size(buffer) = bufSize;
return(buffer);
}
void Duktape_RunOnEventLoop_AbortSink(void *chain, void *user)
{
Duktape_EventLoopDispatchData *tmp = (Duktape_EventLoopDispatchData*)user;