diff options
author | James M Snell <jasnell@gmail.com> | 2020-05-07 23:31:56 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-05-31 02:20:00 +0300 |
commit | 56ff1ee55a57b1169dc567f0f51e58a6f2ccda6d (patch) | |
tree | 581a72ccbbd7f82765943a982372f21069d5ecac /src/udp_wrap.cc | |
parent | c24b74a7abec0848484671771d250cfd961f128e (diff) |
src: extract AllocatedBuffer from env.h
Cleanup up env.h by removing things that are not
specific to `Environment`.
PR-URL: https://github.com/nodejs/node/pull/33291
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/udp_wrap.cc')
-rw-r--r-- | src/udp_wrap.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 9013bc9fe33..eb02db0a2a4 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -20,6 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. #include "udp_wrap.h" +#include "allocated_buffer-inl.h" #include "env-inl.h" #include "node_buffer.h" #include "node_sockaddr-inl.h" @@ -688,7 +689,7 @@ void UDPWrap::OnAlloc(uv_handle_t* handle, } uv_buf_t UDPWrap::OnAlloc(size_t suggested_size) { - return env()->AllocateManaged(suggested_size).release(); + return AllocatedBuffer::AllocateManaged(env(), suggested_size).release(); } void UDPWrap::OnRecv(uv_udp_t* handle, |