--- parser3/src/include/pa_array.h 2025/05/27 15:10:24 1.103 +++ parser3/src/include/pa_array.h 2025/08/01 16:14:44 1.105 @@ -8,7 +8,7 @@ #ifndef PA_ARRAY_H #define PA_ARRAY_H -#define IDENT_PA_ARRAY_H "$Id: pa_array.h,v 1.103 2025/05/27 15:10:24 moko Exp $" +#define IDENT_PA_ARRAY_H "$Id: pa_array.h,v 1.105 2025/08/01 16:14:44 moko Exp $" // includes @@ -227,6 +227,11 @@ protected: void resize(size_t asize) { if(fallocated){ felements=(T *)pa_realloc(felements, asize*sizeof(T)); +#ifdef PA_DEBUG_DISABLE_GC + // non-gc realloc doesn't zero; manually zero expanded region + if(asize > fallocated) + memset((void *)(felements+fallocated), 0, (asize-fallocated) * sizeof(T)); +#endif fallocated=asize; } else { fallocated=asize; @@ -318,11 +323,6 @@ public: inline size_t index() { return fcurrent - farray.felements; } - - // returns the current index string value of the iterator - inline char *key() { - return pa_uitoa(index()); - } }; // Slower array iterator for arrays that can be modified during iteration