Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

wbxml_mem.c

Go to the documentation of this file.
00001 /*
00002  * WBXML Lib, the WBXML Library.
00003  * Copyright (C) 2002-2003  Aymerick Jéhanne
00004  * 
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License (version 2.1) as published by the Free Software Foundation.
00008  * 
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  *
00018  * LGPL v2.1: http://www.gnu.org/licenses/lgpl.txt
00019  *
00020  * Author Contact: libwbxml@jehanne.org
00021  * WBXML Lib home: http://libwbxml.jehanne.org
00022  */
00023  
00034 #include <string.h> /* For strdup() */
00035 
00036 #include "wbxml.h"
00037 
00038 
00039 /***************************************************
00040  *    Public Functions
00041  */
00042 
00043 WBXML_DECLARE(void *) wbxml_malloc(size_t size)
00044 {
00045 #ifdef WBXML_USE_LEAKTRACKER
00046     return lt_malloc(size);
00047 #else
00048     return malloc(size);
00049 #endif
00050 }
00051 
00052 
00053 WBXML_DECLARE(void) wbxml_free(void *memblock)
00054 {
00055 #ifdef WBXML_USE_LEAKTRACKER
00056     lt_free(memblock);
00057 #else
00058     free(memblock);
00059 #endif
00060 }
00061 
00062 
00063 WBXML_DECLARE(void *) wbxml_realloc(void *memblock, size_t size)
00064 {
00065 #ifdef WBXML_USE_LEAKTRACKER
00066     return lt_realloc(memblock, size);
00067 #else
00068     return realloc(memblock, size);
00069 #endif
00070 }
00071 
00072 
00073 WBXML_DECLARE(char *) wbxml_strdup(const char *str)
00074 {
00075 #ifdef WBXML_USE_LEAKTRACKER
00076     return lt_strdup(str);
00077 #else
00078     return strdup(str);
00079 #endif
00080 }

Generated on Mon Nov 24 20:09:43 2003 for WBXML Library by doxygen1.3-rc1