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
  • Loading branch information
nkreeger committed Mar 16, 2020
1 parent 86f146a commit 3e26be9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/node_crypto_common.h
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 All @@ -13,6 +12,9 @@
#include <unordered_map>

namespace node {

class Environment;

namespace crypto {

// OPENSSL_free is a macro, so we need a wrapper function.
Expand Down
1 change: 0 additions & 1 deletion src/node_http_common-inl.h
Expand Up @@ -4,7 +4,6 @@
#include "node_http_common.h"
#include "node.h"
#include "node_mem-inl.h"
#include "env-inl.h"
#include "v8.h"

#include <algorithm>
Expand Down
3 changes: 2 additions & 1 deletion src/node_sockaddr.h
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
1 change: 0 additions & 1 deletion src/stream_base-inl.h
Expand Up @@ -6,7 +6,6 @@
#include "stream_base.h"

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

namespace node {
Expand Down

0 comments on commit 3e26be9

Please sign in to comment.