diff lwlink/expr.c @ 206:299c5d793aca

Made lwlink smarter about not included unneeded (unreferenced) members of a library file
author lost
date Mon, 20 Apr 2009 02:24:33 +0000
parents 106c2fe3c9d9
children bae1e3ecdce1
line wrap: on
line diff
--- a/lwlink/expr.c	Sun Apr 19 17:44:46 2009 +0000
+++ b/lwlink/expr.c	Mon Apr 20 02:24:33 2009 +0000
@@ -53,6 +53,19 @@
 	lw_free(s);
 }
 
+lw_expr_stack_t *lw_expr_stack_dup(lw_expr_stack_t *s)
+{
+	lw_expr_stack_node_t *t;
+	lw_expr_stack_t *s2;
+		
+	s2 = lw_expr_stack_create();	
+	for (t = s -> head; t; t = t -> next)
+	{
+		lw_expr_stack_push(s2, t -> term);
+	}
+	return s2;
+}
+
 void lw_expr_term_free(lw_expr_term_t *t)
 {
 	if (t)