changeset 667:7315c6e953c3

Remove xnjsmb_coord_new() in coord.cc
author Thinker K.F. Li <thinker@branda.to>
date Wed, 04 Aug 2010 21:58:10 +0800
parents b6fb543d69ee
children 916dc9723086
files nodejs/coord.cc nodejs/mbfly_njs.h
diffstat 2 files changed, 0 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/nodejs/coord.cc	Wed Aug 04 21:35:40 2010 +0800
+++ b/nodejs/coord.cc	Wed Aug 04 21:58:10 2010 +0800
@@ -63,46 +63,6 @@
 
 #include "coord-inc.h"
 
-/*! \brief Create a coord object associated with the rdman of the runtime.
- *
- * Two internal fields, coord and rdman.
- */
-Handle<Value>
-xnjsmb_coord_new(const Arguments &args) {
-    HandleScope scope;
-    Handle<Object> js_rt;
-    Handle<Object> coord_obj, parent_obj;
-    njs_runtime_t *rt;
-    redraw_man_t *rdman;
-    coord_t *coord, *parent = NULL;
-    int argc;
-
-    argc = args.Length();
-    if(argc > 1)
-	THROW("Too many arguments (> 1)");
-
-    js_rt = args.This();
-    rt = (njs_runtime_t *)UNWRAP(js_rt);
-    rdman = X_njs_MB_rdman(rt);
-
-    if(argc == 1) {
-	parent_obj = args[0]->ToObject();
-	parent = (coord_t *)UNWRAP(parent_obj);
-    }
-    
-    coord = rdman_coord_new(rdman, parent);
-    ASSERT(coord != NULL);
-    
-    coord_obj = xnjsmb_auto_coord_new(coord).As<Object>();
-    if(!parent_obj.IsEmpty())
-	SET(coord_obj, "parent", parent_obj);
-    SET(coord_obj, "mbrt", js_rt);
-
-    scope.Close(coord_obj);
-    
-    return coord_obj;
-}
-
 Handle<Value> export_xnjsmb_auto_coord_new(coord_t *coord) {
     xnjsmb_auto_coord_new(coord);
 }
--- a/nodejs/mbfly_njs.h	Wed Aug 04 21:35:40 2010 +0800
+++ b/nodejs/mbfly_njs.h	Wed Aug 04 21:58:10 2010 +0800
@@ -20,7 +20,6 @@
 redraw_man_t *xnjsmb_rt_rdman(v8::Handle<v8::Object> mbrt);
 
 /* From coord.cc */
-v8::Handle<v8::Value> xnjsmb_coord_new(const v8::Arguments &args);
 void xnjsmb_coord_mkroot(v8::Handle<v8::Object> js_rt);
 v8::Handle<v8::Value> export_xnjsmb_auto_coord_new(coord_t *coord);