|
|
| version 1.7, 2001/02/11 11:27:25 | version 1.59.2.6, 2003/03/06 12:02:05 |
|---|---|
| Line 1 | Line 1 |
| /* | /** @file |
| $Id$ | Parser: pool class implementation. |
| Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) | |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | |
| */ | */ |
| #include <string.h> | static const char* IDENT_POOL_C="$Date$"; |
| #include "pa_pool.h" | #include "pa_pool.h" |
| #include "pa_exception.h" | #include "pa_types.h" |
| #include "pa_common.h" | |
| char* Pool::format_integer(int value) { | |
| char local[MAX_NUMBER]; | |
| return copy(local, snprintf(local, MAX_NUMBER, "%d", value)+1/*for terminating 0*/); | |
| }; | |
| void *Pool::check(void *ptr, size_t size) { | |
| if(!ptr) | |
| fexception.raise(0, 0, | |
| 0, | |
| "Pool::_alloc(%u) returned NULL", size); | |
| return ptr; | |
| } |