diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2010-08-30 16:04:31 +0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-08-30 12:13:41 -0700 |
commit | db23af05b04442b7d910c535900a9f78a2983b56 (patch) | |
tree | d904b1cffca417120d7ec3538cdadd7883917667 /src/node.h | |
parent | 635986e4338cf34cf8e1abc4343ffd69d109bb4e (diff) | |
download | node-db23af05b04442b7d910c535900a9f78a2983b56.tar.gz |
Constants should be readOnly and DontDelete
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 3 |
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), \ |