diff 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
line wrap: on
line diff
--- a/nodejs/mbfly_njs.cc	Thu Aug 05 17:42:36 2010 +0800
+++ b/nodejs/mbfly_njs.cc	Thu Aug 05 17:43:33 2010 +0800
@@ -28,8 +28,11 @@
 static void
 xnjsmb_coord_mod(Handle<Object> mbrt, Handle<Value> ret) {
     Handle<Object> ret_obj = ret->ToObject();
+    coord_t *coord;
 
     SET(ret_obj, "mbrt", mbrt);
+    coord = (coord_t *)UNWRAP(ret_obj);
+    mb_prop_set(&coord->obj.props, PROP_JSOBJ, *ret_obj);
 }
 
 #define xnjsmb_auto_coord_new export_xnjsmb_auto_coord_new