diff utils.h @ 39:337110e7240a

Pass the size to free; it makes debug checking easier.
author David A. Holland
date Sat, 30 Mar 2013 21:17:47 -0400
parents b156910b59b2
children f185d1ac4db4
line wrap: on
line diff
--- a/utils.h	Sat Mar 30 21:02:25 2013 -0400
+++ b/utils.h	Sat Mar 30 21:17:47 2013 -0400
@@ -40,13 +40,14 @@
 
 
 void *domalloc(size_t len);
-void *dorealloc(void *ptr, size_t len);
-void dofree(void *ptr);
+void *dorealloc(void *ptr, size_t oldlen, size_t newlen);
+void dofree(void *ptr, size_t len);
 
 char *dostrdup(const char *s);
 char *dostrdup2(const char *s, const char *t);
 char *dostrdup3(const char *s, const char *t, const char *u);
 char *dostrndup(const char *s, size_t len);
+void dostrfree(char *s);
 
 size_t notrailingws(char *buf, size_t len);
 bool is_identifier(const char *str);