Fix regression: add an include for Node.js header.
This commit is contained in:
parent
caa92740d3
commit
8b10c47ed8
2 changed files with 5 additions and 2 deletions
|
|
@ -1,7 +1,11 @@
|
||||||
|
%insert("init") %{
|
||||||
|
#include <node.h>
|
||||||
|
%}
|
||||||
|
|
||||||
%define %node(moduleName)
|
%define %node(moduleName)
|
||||||
%insert("post-init") %{
|
%insert("post-init") %{
|
||||||
extern "C" {
|
extern "C" {
|
||||||
NODE_MODULE(moduleName, moduleName ## _initialize)
|
NODE_MODULE(moduleName, moduleName ## _initialize)
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
%enddef
|
%enddef
|
||||||
|
|
|
||||||
|
|
@ -667,7 +667,6 @@ int JSEmitter::initialize(Node *n) {
|
||||||
namespaces = NewHash();
|
namespaces = NewHash();
|
||||||
Hash *global_namespace;
|
Hash *global_namespace;
|
||||||
if(State::IsSet(state.global(FLAG_NO_MODULE_OBJECT))) {
|
if(State::IsSet(state.global(FLAG_NO_MODULE_OBJECT))) {
|
||||||
Printf(stdout, "AAAAAAAAAAAAAAAAAAAAAAAAAAA");
|
|
||||||
global_namespace = createNamespaceEntry("global", 0);
|
global_namespace = createNamespaceEntry("global", 0);
|
||||||
} else {
|
} else {
|
||||||
global_namespace = createNamespaceEntry(Char(Getattr(n, "name")), "global");
|
global_namespace = createNamespaceEntry(Char(Getattr(n, "name")), "global");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue