diff options
author | 2023-03-08 08:29:29 +0200 | |
---|---|---|
committer | 2023-03-07 22:29:29 -0800 | |
commit | 28346e4a390036270e393192550175a01d0e7f41 (patch) | |
tree | 123e509a186d58a99266fdad81539114a44d687b /src/bun.js/bindings/Buffer.h | |
parent | 95b59ea0ef637abde76dad4a100cae6c496c1470 (diff) | |
download | bun-28346e4a390036270e393192550175a01d0e7f41.tar.gz bun-28346e4a390036270e393192550175a01d0e7f41.tar.zst bun-28346e4a390036270e393192550175a01d0e7f41.zip |
improve `Buffer` compatibility with Node.js (#2341)
* improve `Buffer` compatibility with Node.js
* use `memmove()`
allow `encoding` to be `undefined`
Diffstat (limited to 'src/bun.js/bindings/Buffer.h')
-rw-r--r-- | src/bun.js/bindings/Buffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/bindings/Buffer.h b/src/bun.js/bindings/Buffer.h index fecc627a1..4f1583513 100644 --- a/src/bun.js/bindings/Buffer.h +++ b/src/bun.js/bindings/Buffer.h @@ -16,7 +16,7 @@ extern "C" JSC::EncodedJSValue JSBuffer__bufferFromLength(JSC::JSGlobalObject* l extern "C" JSC::EncodedJSValue JSBuffer__bufferFromPointerAndLengthAndDeinit(JSC::JSGlobalObject* lexicalGlobalObject, char* ptr, size_t length, void* ctx, JSTypedArrayBytesDeallocator bytesDeallocator); extern "C" JSC::EncodedJSValue Bun__encoding__toString(const uint8_t* input, size_t len, JSC::JSGlobalObject* globalObject, Encoding encoding); extern "C" JSC::EncodedJSValue Bun__encoding__toStringUTF8(const uint8_t* input, size_t len, JSC::JSGlobalObject* globalObject); -extern "C" void Bun__Buffer_fill(ZigString*, void*, size_t, WebCore::BufferEncodingType); +extern "C" bool Bun__Buffer_fill(ZigString*, void*, size_t, WebCore::BufferEncodingType); namespace WebCore { |