Skip to content

Commit

Permalink
Fix module registration
Browse files Browse the repository at this point in the history
ws passes an 'extern "C"' function to the NODE_MODULE macro.
The API docs at http://nodejs.org/api/addons.html DO NOT use 'extern
"C"'.
Removing 'extern "C"' causes the module to work properly on my system
(Ubuntu 14.04, 64bit, node v0.10.25).[
Fixes #434
  • Loading branch information
pskocik committed Jan 18, 2015
1 parent 571886d commit c2d7cf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bufferutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class BufferUtil : public ObjectWrap
}
};

extern "C" void init (Handle<Object> target)
void init (Handle<Object> target)
{
NanScope();
BufferUtil::Initialize(target);
Expand Down
2 changes: 1 addition & 1 deletion src/validation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class Validation : public ObjectWrap
}
};

extern "C" void init (Handle<Object> target)
void init (Handle<Object> target)
{
NanScope();
Validation::Initialize(target);
Expand Down

0 comments on commit c2d7cf4

Please sign in to comment.