diff options
author | Paul Querna <pquerna@apache.org> | 2010-07-14 10:22:41 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-07-14 21:17:25 +0400 |
commit | 30dadfc033b45842691cef02caf059ba5db0b63a (patch) | |
tree | 369ad997b9b7cc79643a733409fdc023926e0700 /wscript | |
parent | 781d51285d603a7a0ded3ead3bdfc23e60567cf4 (diff) |
Register builtin extensions via a macro, rather than a manual strcmp
Set the stage for making the builtin modules more dynamic.
Note: this only converts crypto and net, I will add more extensions in a
later commit.
* node.h: Add utility macro for converting macro values to strings.
* node.h: Include the actual module name inside the module structure, not
just the file it was built from.
* node.h: New Macro, NODE_MODULE_DECL, for declaring an external reference
to a module structure.
* node_extensions.cc: New File, implements get_builtin_module, which
iterates over the module structures that are compiled into node.
* node.cc(node::Binding): Use the new module lookup function to find
modules.
* node_{net,crypto}.c: Add NODE_MODULEs to generate the module structure.
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -459,6 +459,7 @@ def build(bld): node.source = """ src/node.cc src/node_buffer.cc + src/node_extensions.cc src/node_http_parser.cc src/node_net.cc src/node_io_watcher.cc |