changeset 86:00ddfdc1e1e3

Fixed wrong size in lw_alloc() for lw_stack_create()
author lost@l-w.ca
date Wed, 22 Jun 2011 18:32:46 -0600
parents 8fa52c3f2970
children b5785eb3441f
files lwlib/lw_stack.c lwlib/lw_stack.h
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/lw_stack.c	Wed May 25 21:59:58 2011 -0600
+++ b/lwlib/lw_stack.c	Wed Jun 22 18:32:46 2011 -0600
@@ -30,7 +30,7 @@
 {
 	lw_stack_t S;
 	
-	S = lw_alloc(sizeof(lw_stack_t));
+	S = lw_alloc(sizeof(struct lw_stack_priv));
 	S -> head = NULL;
 	S -> freefn = freefn;
 	return S;
--- a/lwlib/lw_stack.h	Wed May 25 21:59:58 2011 -0600
+++ b/lwlib/lw_stack.h	Wed Jun 22 18:32:46 2011 -0600
@@ -24,7 +24,6 @@
 
 
 #ifdef ___lw_stack_c_seen___
-
 struct lw_stack_node_priv
 {
 	void *data;
@@ -39,6 +38,7 @@
 
 typedef struct lw_stack_priv * lw_stack_t;
 
+
 #else /* def ___lw_stack_c_seen___ */
 
 typedef void * lw_stack_t;