#ifndef __MEMORY_H
#define __MEMORY_H

#include <Python.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#define NEW(x,t)       { \
			   x = (t *) PyMem_Malloc(sizeof(t)); \
			   assert(x); \
                         }

#define DEL(x)           { \
                             if (x)     \
                           { \
                               PyMem_Free(x); \
                               x = 0;   \
                           } \
                         }

#endif
