Skip to content

Commit

Permalink
core, feat: use exlib::string::Buffer as ArrayBuffer allocator.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Oct 3, 2017
1 parent 3312d9d commit d04963c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fibjs/src/base/Runtime.cpp
Expand Up @@ -42,12 +42,12 @@ class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {

virtual void* AllocateUninitialized(size_t length)
{
return malloc(length);
return exlib::string::Buffer::New(length)->data();
}

virtual void Free(void* data, size_t)
{
free(data);
exlib::string::Buffer::fromData((char*)data)->unref();
}
};

Expand Down
2 changes: 1 addition & 1 deletion vender
Submodule vender updated 1 files
+133 −76 exlib/include/qstring.h

0 comments on commit d04963c

Please sign in to comment.