Created
April 7, 2014 22:59
-
-
Save tjfontaine/10071300 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/shim.cc b/src/shim.cc | |
| index 88f5494..a7fae99 100644 | |
| --- a/src/shim.cc | |
| +++ b/src/shim.cc | |
| @@ -1451,7 +1451,9 @@ shim_buffer_new_external(shim_ctx_s* ctx, char* data, size_t len, | |
| #if NODE_VERSION_AT_LEAST(0, 11, 3) | |
| return new shim_val_s(node::Buffer::New(data, len, cb, hint)); | |
| #else | |
| - return new shim_val_s(SHIM__TO_LOCAL(Buffer::New(data, len, cb, hint)->handle_)); | |
| + Buffer* buf = Buffer::New(data, len, cb, hint); | |
| + shim_val_s* tmp = new shim_val_s(Local<Object>::New(buf->handle_)); | |
| + return tmp; | |
| #endif | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment