diff lwlib/lw_alloc.c @ 21:ac311e7ffed6

Split lw_alloc.c for better linking
author lost@l-w.ca
date Sat, 22 Jan 2011 18:28:07 -0700
parents 2c24602be78f
children 8e25147c2aa8
line wrap: on
line diff
--- a/lwlib/lw_alloc.c	Sat Jan 22 18:06:37 2011 -0700
+++ b/lwlib/lw_alloc.c	Sat Jan 22 18:28:07 2011 -0700
@@ -24,12 +24,6 @@
 #define ___lw_alloc_c_seen___
 #include "lw_alloc.h"
 
-void lw_free(void *P)
-{
-	if (P)
-		free(P);
-}
-
 void *lw_alloc(int size)
 {
 	void *r;
@@ -41,26 +35,3 @@
 	}
 	return r;
 }
-
-void *lw_realloc(void *P, int S)
-{
-	void *r;
-
-	if (!P)
-	{
-		return lw_alloc(S);
-	}
-	
-	if (!S)
-	{
-		lw_free(P);
-		return NULL;
-	}
-	
-	r = realloc(P, S);
-	if (!r)
-	{
-		abort();
-	}
-	return r;
-}