Add a swig macro to register node.js extensions.
This commit is contained in:
parent
4fea3a403e
commit
213c107b7f
1 changed files with 7 additions and 0 deletions
7
Lib/javascript/v8/node.i
Normal file
7
Lib/javascript/v8/node.i
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
%define %node(moduleName)
|
||||||
|
%insert("post-init") %{
|
||||||
|
extern "C" {
|
||||||
|
NODE_MODULE(moduleName, moduleName ## _initialize)
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
%enddef
|
||||||
Loading…
Add table
Add a link
Reference in a new issue