diff src/redraw_man.c @ 1372:0afd598a0b30

Add clone_from_subtree() for coord object of nodejs
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 07 Mar 2011 09:38:09 +0800
parents 36cbe73813a8
children e5b3d68d0b05
line wrap: on
line diff
--- a/src/redraw_man.c	Sun Mar 06 19:31:28 2011 +0800
+++ b/src/redraw_man.c	Mon Mar 07 09:38:09 2011 +0800
@@ -1109,8 +1109,8 @@
  * \return the root of new subtree.
  */
 coord_t *
-rdman_coord_clone_subtree(redraw_man_t *rdman,
-			  coord_t *parent, coord_t *src) {
+rdman_coord_clone_from_subtree(redraw_man_t *rdman,
+			       coord_t *parent, coord_t *src) {
     coord_t *cloning;
     coord_t *child;
     shape_t *member, *cloning_member;
@@ -1137,7 +1137,7 @@
 	    member_idx++;
 	}
 
-	rdman_coord_clone_subtree(rdman, cloning, child);
+	rdman_coord_clone_from_subtree(rdman, cloning, child);
     }
     
     /* Clone remain members after last child if any */
@@ -3108,7 +3108,7 @@
 }
 
 static void
-test_rdman_coord_clone_subtree(void) {
+test_rdman_coord_clone_from_subtree(void) {
     redraw_man_t _rdman;
     redraw_man_t *rdman;
     coord_t *coord1, *coord2, *coord3;
@@ -3136,7 +3136,7 @@
     coord3 = rdman_coord_new(rdman, coord2);
     CU_ASSERT(coord3 != NULL);
 
-    cloning = rdman_coord_clone_subtree(rdman, rdman->root_coord, coord1);
+    cloning = rdman_coord_clone_from_subtree(rdman, rdman->root_coord, coord1);
     CU_ASSERT(NEXT_CHILD(coord1) == cloning);
     
     cloning_visit = FIRST_CHILD(cloning);
@@ -3159,7 +3159,7 @@
     CU_ADD_TEST(suite, test_own_canvas_area);
     CU_ADD_TEST(suite, test_own_canvas);
     CU_ADD_TEST(suite, test_own_canvas_redraw);
-    CU_ADD_TEST(suite, test_rdman_coord_clone_subtree);
+    CU_ADD_TEST(suite, test_rdman_coord_clone_from_subtree);
 
     return suite;
 }