diff options
author | Ryan <ry@tinyclouds.org> | 2009-05-26 03:30:51 +0200 |
---|---|---|
committer | Ryan <ry@tinyclouds.org> | 2009-05-26 03:30:51 +0200 |
commit | d1b0ce6d37accf5e0007df8f975d487f173b72fa (patch) | |
tree | 6d4e7028bc2cd8367d1599d4d5405fe09c2a670b /src/node.h | |
parent | f3af6c6f531e5dbef144e2aa1f0ed2c3db75455a (diff) | |
download | node-d1b0ce6d37accf5e0007df8f975d487f173b72fa.tar.gz |
Large refactor of file code.
All the c++ code is now reduced to simple wrappers. The node.fs.File object
is defined entirely in javascript now. As is the actionQueue methods.
This makes the boundaries much cleaner. There is still some thought that
needs to go into how exactly the API should behave but this simplification
is a first step.
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node.h b/src/node.h index d6db49da1..7d1d29607 100644 --- a/src/node.h +++ b/src/node.h @@ -12,6 +12,8 @@ namespace node { #define NODE_SET_METHOD(obj, name, callback) \ obj->Set(NODE_SYMBOL(name), v8::FunctionTemplate::New(callback)->GetFunction()) #define NODE_UNWRAP(type, value) static_cast<type*>(node::ObjectWrap::Unwrap(value)) +#define NODE_DEFINE_CONSTANT(target, constant) \ + (target)->Set(v8::String::NewSymbol(#constant), v8::Integer::New(constant)) #define NODE_SET_PROTOTYPE_METHOD(templ, name, callback) \ do { \ |