Commit Graph

1893 Commits (3a00470dbb0ac1ead14b52624b16e917e522fddf)

Author SHA1 Message Date
Ryan Dahl 3a00470dbb Add 'root' global variable as reference to sandbox 2010-07-15 10:35:29 -07:00
Ryan Dahl 5f30377bbc Load modules in individual contexts
Add NODE_MODULE_CONTEXTS env var

Only one test was modified to check that this works. NEED to go through all
tests and modify them so that

  NODE_MODULE_CONTEXTS=1 make test

passes.
2010-07-15 10:34:39 -07:00
Matt Ranney 4e50197e53 Datagram socket refactor. Add tests and documentation.
Support setTTL() and setBroadcast() socket options.
2010-07-15 10:27:44 -07:00
Peter Griess e7c4f8cdaa Buffer.copy() should liberally allow empty copies. 2010-07-15 10:20:42 -07:00
Peter Griess b64a521d66 Buffer('') should create a 0-length buffer 2010-07-15 09:54:53 -07:00
Ryan Dahl 8e2530c320 Upgrade V8 to 2.2.24 2010-07-14 11:16:20 -07:00
Paul Querna 870aa3d97f Move evals to extension module. 2010-07-14 10:55:07 -07:00
Paul Querna ace2be8aa6 Move the Stat structure functions to node_file.cc
from node.cc, so we can convert fs to a module.
2010-07-14 10:42:32 -07:00
Paul Querna 82daa46e26 Move Buffer to extension model. 2010-07-14 10:37:24 -07:00
Paul Querna 4f7f43762d Move child process to extension model. 2010-07-14 10:36:52 -07:00
Paul Querna e65c27062f Move http parser to extension model. 2010-07-14 10:36:24 -07:00
Paul Querna e51aef7f3c Move signal_watcher to extension model. 2010-07-14 10:31:45 -07:00
Paul Querna 208290b524 Move cares to extension model 2010-07-14 10:31:20 -07:00
Paul Querna e5bb8abc9d Move stdio to extension model. 2010-07-14 10:29:56 -07:00
Paul Querna 8dbfe5ea8f Use the top level check for the bindings cache
(rather than each potential module having its own if check)
2010-07-14 10:23:24 -07:00
Paul Querna 30dadfc033 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.
2010-07-14 10:17:25 -07:00
isaacs 781d51285d Use execPath for default NODE_PATH, not installPrefix 2010-07-14 09:58:18 -07:00
Jérémy Lal fb645f75fb Update ronnjs (fix rendering of html self-closing tags) 2010-07-14 09:52:59 -07:00
Ryan Dahl 50c38dec70 Update README, remove ref to Ronn 2010-07-14 09:50:17 -07:00
Mikeal Rogers 16cb45103f Adds "pause" and "resume" events to pump and it's readable argument. 2010-07-13 17:17:20 -07:00
David Siegel 2085909aeb fix corner-case bug in Module
and added a test to expose it
2010-07-13 17:15:10 -07:00
Ryan Dahl 6bf294d71a JSON is %j not %f 2010-07-13 10:16:33 -07:00
Paul Querna 367b87d26d Add support for the module structure to process.dlopen. 2010-07-13 07:08:08 -07:00
Paul Querna 49066042a2 Add basic structure and macros for node modules. 2010-07-13 06:59:53 -07:00
Paul Querna 480164f923 Move node version to a single static header file.
Some compile time variables like the cflags and prefix have been moved to
the node_config.h.in, in the anticipation that they will be removed at
somepoint.
2010-07-13 06:39:47 -07:00
Peter Griess 99a5d1e293 Free kbuf[] in Verify::VerifyFinal(). 2010-07-12 16:37:35 -07:00
Peter Griess ac2404283e Coverity stack size warnings in DefineConstants(). 2010-07-12 16:37:17 -07:00
rick c9e505791a use delete for removing events after removing the final listener 2010-07-12 16:29:58 -07:00
Jérémy Lal abd3f8a02a make node.1 depend on make all 2010-07-12 16:29:42 -07:00
Jérémy Lal 4be4b5f6f4 lib/node, not lib/nodejs ! 2010-07-12 15:23:10 -07:00
Brian 554b02a14c Improve docs
Added default values for many parameters, missing properties and methods,
and slight reorganization of the Child Process section.
2010-07-12 14:23:35 -07:00
Ryan Dahl d700a6f74a Return child from execFile 2010-07-12 14:18:09 -07:00
Peter Griess 7a706e4206 Coverity fixes: src/platform_linux.cc 2010-07-12 13:20:31 -07:00
Peter Griess 6eb0b6ac27 Coverity fixes: src/node_net 2010-07-12 13:20:31 -07:00
Peter Griess 760fb17bbf Coverity fixes: src/node_file 2010-07-12 13:20:31 -07:00
Peter Griess 792c7caf40 Coverity fixes: src/node_crypto 2010-07-12 13:20:31 -07:00
Peter Griess 4e3c5d88b3 Coverity fixes: src/node.cc 2010-07-12 13:20:26 -07:00
Adam Wiggins c8dba94ff6 docs for dgram module (UDP and unix sockets) 2010-07-12 11:18:52 -07:00
Jérémy Lal a7763d55e4 Fix spelling error 2010-07-12 10:35:35 -07:00
Jérémy Lal 2b8a9a8358 Use ronnjs 0.2 to generate docs. Small cosmetic change. 2010-07-12 10:24:09 -07:00
Jérémy Lal a7e1efc5bd Environment variables NODE_PREFIX, NODE_PATH in node-waf
Those variables have following defaults :
 - NODE_PREFIX is relative to the current path of the node_addon.py file
   It is used as the base path of node include files.
 - NODE_PATH is ~/.node_libraries
   It's where modules are installed when calling `node-waf install`
   Note .js files must be explicitely installed by the module's wscript.

Usage :
NODE_PREFIX=/usr/local NODE_PATH=~/.node_libraries node-waf configure
2010-07-12 07:46:45 -07:00
Ryan Dahl b1901cd5a5 hack fix to v8 2.2.23 2010-07-07 20:10:01 +02:00
Ryan Dahl facb904c5d Upgrade V8 to 2.2.23 2010-07-07 19:47:38 +02:00
Dmitriy Shalashov 70a8fb3763 Fix headers with empty value. 2010-07-07 18:46:24 +02:00
Brian 1191ca052f Fix docs
Added consistency to the representation of optional parameters and separated
out multiple functions that were in a single heading.
2010-07-07 16:49:04 +02:00
Jerome Etienne 8e9f59a452 Support of console.dir + console.assert 2010-07-07 16:48:59 +02:00
Ryan Dahl 0bceaaa3d4 Fix addon example in docs 2010-07-07 16:48:53 +02:00
Ryan Dahl 3d948d85ce Remove a bunch of useless waf files 2010-07-04 04:16:55 +02:00
Ryan Dahl 0315251d01 Use 'on' in the docs 2010-07-03 10:54:35 +02:00
Ryan Dahl 515dc2161b Experimental: 'on' as alias to 'addListener' 2010-07-03 09:30:32 +02:00