|
|
| version 1.26, 2009/04/30 04:39:06 | version 1.32, 2023/09/26 20:49:07 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: stack class decl. | Parser: stack class decl. |
| Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru> |
| */ | */ |
| #ifndef PA_STACK_H | #ifndef PA_STACK_H |
| #define PA_STACK_H | #define PA_STACK_H |
| static const char * const IDENT_STACK_H="$Date$"; | #define IDENT_PA_STACK_H "$Id$" |
| #include "pa_array.h" | #include "pa_array.h" |
| Line 39 public: | Line 39 public: |
| /// call this prior to collecting garbage [in unused part of stack there may be pointers(unused)] | /// call this prior to collecting garbage [in unused part of stack there may be pointers(unused)] |
| void wipe_unused() { | void wipe_unused() { |
| if(size_t above_top_size=this->fallocated-this->fused) | if(size_t above_top_size=this->fallocated-this->fused) |
| memset(&this->felements[this->fused], 0, above_top_size*sizeof(T)); | memset((void *)&this->felements[this->fused], 0, above_top_size*sizeof(T)); |
| } | } |
| protected: | protected: |