From 6dcf62c8cd3cc0d1be63762d42159a5ede484e0d 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 `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 --- 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 d680eb90eb1649..acf9b23c3b3256 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 ced9e4dd982f79..f477016ec03e9f 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 a3eef5b15eb2bf..5b17e400911f9d 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 9df42f3bfada01..60e88c45888944 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