diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2009-11-03 00:21:00 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2009-11-03 00:21:00 +0100 |
commit | f481183140f5c3ad2c812ae5615b444aa684b2fc (patch) | |
tree | a279289b52bfdfba86995094e804153e938d7092 /src | |
parent | f97d339ce763d269b76aa8bb5add8c6006531c79 (diff) | |
download | node-new-f481183140f5c3ad2c812ae5615b444aa684b2fc.tar.gz |
Add process.platform
Diffstat (limited to 'src')
-rw-r--r-- | src/node.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/node.cc b/src/node.cc index c4731297bf..bf17ce07a0 100644 --- a/src/node.cc +++ b/src/node.cc @@ -428,11 +428,16 @@ static Local<Object> Load(int argc, char *argv[]) { Local<Object> global = Context::GetCurrent()->Global(); global->Set(String::NewSymbol("process"), process); - // node.version + // process.version process->Set(String::NewSymbol("version"), String::New(NODE_VERSION)); - // node.installPrefix + // process.installPrefix process->Set(String::NewSymbol("installPrefix"), String::New(NODE_PREFIX)); + // process.platform +#define xstr(s) str(s) +#define str(s) #s + process->Set(String::NewSymbol("platform"), String::New(xstr(PLATFORM))); + // process.ARGV int i, j; Local<Array> arguments = Array::New(argc - dash_dash_index + 1); |