Skip to content

Commit 44ed42b

Browse files
committed
src: move NODE_MODULE_VERSION to node_version.h
1 parent 0330bdf commit 44ed42b

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/node.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@
5858
# define SIGKILL 9
5959
#endif
6060

61+
#include "node_version.h" /* NODE_MODULE_VERSION */
6162
#include "uv.h"
6263
#include "v8.h"
64+
6365
#include <sys/types.h> /* struct stat */
6466
#include <sys/stat.h>
6567
#include <assert.h>
@@ -202,14 +204,6 @@ struct node_module_struct {
202204

203205
node_module_struct* get_builtin_module(const char *name);
204206

205-
/**
206-
* When this version number is changed, node.js will refuse
207-
* to load older modules. This should be done whenever
208-
* an API is broken in the C++ side, including in v8 or
209-
* other dependencies.
210-
*/
211-
#define NODE_MODULE_VERSION 0x000C /* v0.12 */
212-
213207
#define NODE_STANDARD_MODULE_STUFF \
214208
NODE_MODULE_VERSION, \
215209
NULL, \

src/node_version.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,12 @@
5757
|| ((major) == NODE_MAJOR_VERSION && (minor) < NODE_MINOR_VERSION) \
5858
|| ((major) == NODE_MAJOR_VERSION && (minor) == NODE_MINOR_VERSION && (patch) <= NODE_PATCH_VERSION))
5959

60+
/**
61+
* When this version number is changed, node.js will refuse
62+
* to load older modules. This should be done whenever
63+
* an API is broken in the C++ side, including in v8 or
64+
* other dependencies.
65+
*/
66+
#define NODE_MODULE_VERSION 0x000C /* v0.12 */
67+
6068
#endif /* NODE_VERSION_H */

0 commit comments

Comments
 (0)