projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
635986e
)
Constants should be readOnly and DontDelete
author
Fedor Indutny
<fedor.indutny@gmail.com>
Mon, 30 Aug 2010 09:04:31 +0000
(16:04 +0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Mon, 30 Aug 2010 19:13:41 +0000
(12:13 -0700)
src/node.h
patch
|
blob
|
history
diff --git
a/src/node.h
b/src/node.h
index
e20c801
..
901d853
100644
(file)
--- 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), \