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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user