Skip to content

Commit

Permalink
src: fix extra includes of "env.h" and "env-inl.h"
Browse files Browse the repository at this point in the history
Due to how the Environment class is used throughout the codebase, there
are a log of includes referencing eitehr env.h or env-inl.h.

This commit cleans up the remaining extra includes of 'env.h' or
'env-inl.h' and adds forward declarations of the Environment class.

PR-URL: #32293
Refs: #27531

Fixes: #27531
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
nkreeger authored and addaleax committed Apr 2, 2020
1 parent a4dce9a commit 12a2997
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/node_crypto_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "env.h"
#include "node_crypto.h"
#include "v8.h"
#include <openssl/ssl.h>
Expand Down
3 changes: 2 additions & 1 deletion src/node_sockaddr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "env.h"
#include "memory_tracker.h"
#include "node.h"
#include "uv.h"
Expand All @@ -14,6 +13,8 @@

namespace node {

class Environment;

class SocketAddress : public MemoryRetainer {
public:
struct Hash {
Expand Down
5 changes: 2 additions & 3 deletions src/stream_base-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "stream_base.h"

#include "async_wrap-inl.h"
#include "node.h"
#include "env-inl.h"
#include "stream_base.h"
#include "v8.h"

namespace node {
Expand Down
3 changes: 2 additions & 1 deletion src/stream_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "async_wrap-inl.h"
#include "env.h"
#include "async_wrap.h"
#include "node.h"
#include "util.h"

Expand Down

0 comments on commit 12a2997

Please sign in to comment.