Skip to content

Commit

Permalink
nan_json.h: fix build breakage in node versions prior to 7.0.0
Browse files Browse the repository at this point in the history
Change node version test for v8::Stringify to check for
NODE_MODULE_VERSION >= NODE_7_0_MODULE_VERSION (51)

Signed-off-by: Michael Ira Krufky <mkrufky@gmail.com>
  • Loading branch information
mkrufky committed Apr 6, 2017
1 parent e3ca223 commit ac8d47d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define NODE_4_0_MODULE_VERSION 46
#define NODE_5_0_MODULE_VERSION 47
#define NODE_6_0_MODULE_VERSION 48
#define NODE_7_0_MODULE_VERSION 51

#ifdef _MSC_VER
# define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800)
Expand Down
4 changes: 2 additions & 2 deletions nan_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#define NAN_JSON_H_NEED_PARSE 0
#endif // NODE_MODULE_VERSION < NODE_0_12_MODULE_VERSION

#if NODE_MODULE_VERSION > NODE_6_0_MODULE_VERSION
#if NODE_MODULE_VERSION >= NODE_7_0_MODULE_VERSION
#define NAN_JSON_H_NEED_STRINGIFY 0
#else
#define NAN_JSON_H_NEED_STRINGIFY 1
#endif // NODE_MODULE_VERSION > NODE_6_0_MODULE_VERSION
#endif // NODE_MODULE_VERSION >= NODE_7_0_MODULE_VERSION

class JSON {
public:
Expand Down

0 comments on commit ac8d47d

Please sign in to comment.