summaryrefslogtreecommitdiff
path: root/src/node.h
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2010-08-30 16:04:31 +0700
committerRyan Dahl <ry@tinyclouds.org>2010-08-30 12:13:41 -0700
commitdb23af05b04442b7d910c535900a9f78a2983b56 (patch)
treed904b1cffca417120d7ec3538cdadd7883917667 /src/node.h
parent635986e4338cf34cf8e1abc4343ffd69d109bb4e (diff)
downloadnode-db23af05b04442b7d910c535900a9f78a2983b56.tar.gz
Constants should be readOnly and DontDelete
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node.h b/src/node.h
index e20c801fd..901d853d3 100644
--- a/src/node.h
+++ b/src/node.h
@@ -25,7 +25,8 @@ namespace node {
#define NODE_DEFINE_CONSTANT(target, constant) \
(target)->Set(v8::String::NewSymbol(#constant), \
- v8::Integer::New(constant))
+ v8::Integer::New(constant), \
+ static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete))
#define NODE_SET_METHOD(obj, name, callback) \
obj->Set(v8::String::NewSymbol(name), \