Mercurial > MadButterfly
comparison nodejs/mbfly_njs.cc @ 671:fc29a343ce7c
Track JS object with property store of objects
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 05 Aug 2010 17:43:33 +0800 |
parents | b6fb543d69ee |
children | c643af2095c5 |
comparison
equal
deleted
inserted
replaced
670:f0b4fbcd1c51 | 671:fc29a343ce7c |
---|---|
26 } | 26 } |
27 | 27 |
28 static void | 28 static void |
29 xnjsmb_coord_mod(Handle<Object> mbrt, Handle<Value> ret) { | 29 xnjsmb_coord_mod(Handle<Object> mbrt, Handle<Value> ret) { |
30 Handle<Object> ret_obj = ret->ToObject(); | 30 Handle<Object> ret_obj = ret->ToObject(); |
31 coord_t *coord; | |
31 | 32 |
32 SET(ret_obj, "mbrt", mbrt); | 33 SET(ret_obj, "mbrt", mbrt); |
34 coord = (coord_t *)UNWRAP(ret_obj); | |
35 mb_prop_set(&coord->obj.props, PROP_JSOBJ, *ret_obj); | |
33 } | 36 } |
34 | 37 |
35 #define xnjsmb_auto_coord_new export_xnjsmb_auto_coord_new | 38 #define xnjsmb_auto_coord_new export_xnjsmb_auto_coord_new |
36 | 39 |
37 static void | 40 static void |