--- /dev/null 2008-01-24 05:55:04.569465027 -0500
+++ src/memory.h 2008-01-24 10:40:36.000000000 -0500
@@ -0,0 +1,49 @@
+/* -*- mode: C -*- */
+/*
+ IGraph library.
+ Copyright (C) 2003, 2004, 2005 Gabor Csardi <csardi@rmki.kfki.hu>
+ MTA RMKI, Konkoly-Thege Miklos st. 29-33, Budapest 1121, Hungary
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA
+
+*/
+
+#ifndef REST_MEMORY_H
+#define REST_MEMORY_H
+
+#include <stdlib.h>
+
+#undef __BEGIN_DECLS
+#undef __END_DECLS
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS /* empty */
+# define __END_DECLS /* empty */
+#endif
+
+__BEGIN_DECLS
+
+#define Calloc(n,t) (t*) calloc( (size_t)(n), sizeof(t) )
+#define Realloc(p,n,t) (t*) realloc((void*)(p), (size_t)((n)*sizeof(t)))
+#define Free(p) (free( (void *)(p) ), (p) = NULL)
+
+int igraph_free(void *p);
+
+__END_DECLS
+
+#endif