From df18f2a54655e4e98089415506cc55514b05cdd8 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 22 Sep 2017 12:15:47 +0200 Subject: [PATCH] src: do not include internals from node_buffer.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `node_buffer.h` is a public header, so it should not be using the `node_internals.h` internal header. Ref: 290315ace7eed6eeeb300754dd68fc1af4d80c9b Fixes: https://github.com/nodejs/node/issues/15552 PR-URL: https://github.com/nodejs/node/pull/15554 Reviewed-By: Matteo Collina Reviewed-By: Andreas Madsen Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Richard Lau Reviewed-By: Gibson Fahnestock --- src/node_buffer.h | 3 ++- src/node_serdes.cc | 5 +---- src/spawn_sync.h | 2 +- src/string_bytes.cc | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/node_buffer.h b/src/node_buffer.h index d680eb90eb..acf9b23c3b 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -22,7 +22,8 @@ #ifndef SRC_NODE_BUFFER_H_ #define SRC_NODE_BUFFER_H_ -#include "node_internals.h" +#include "node.h" +#include "v8.h" namespace node { diff --git a/src/node_serdes.cc b/src/node_serdes.cc index ced9e4dd98..f477016ec0 100644 --- a/src/node_serdes.cc +++ b/src/node_serdes.cc @@ -1,10 +1,7 @@ -#include "node.h" +#include "node_internals.h" #include "node_buffer.h" #include "base-object.h" #include "base-object-inl.h" -#include "env.h" -#include "env-inl.h" -#include "v8.h" namespace node { diff --git a/src/spawn_sync.h b/src/spawn_sync.h index a3eef5b15e..5b17e40091 100644 --- a/src/spawn_sync.h +++ b/src/spawn_sync.h @@ -24,7 +24,7 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#include "node.h" +#include "node_internals.h" #include "node_buffer.h" namespace node { diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 9df42f3bfa..60e88c4588 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -22,9 +22,8 @@ #include "string_bytes.h" #include "base64.h" -#include "node.h" +#include "node_internals.h" #include "node_buffer.h" -#include "v8.h" #include #include // memcpy