Diff for /parser3/src/include/pa_array.h between versions 1.102 and 1.105

version 1.102, 2024/12/23 16:59:17 version 1.105, 2025/08/01 16:14:44
Line 227  protected: Line 227  protected:
         void resize(size_t asize) {          void resize(size_t asize) {
                 if(fallocated){                  if(fallocated){
                         felements=(T *)pa_realloc(felements, asize*sizeof(T));                          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;                          fallocated=asize;
                 } else {                  } else {
                         fallocated=asize;                          fallocated=asize;
Line 318  public: Line 323  public:
         inline size_t index() {          inline size_t index() {
                 return fcurrent - farray.felements;                  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  // Slower array iterator for arrays that can be modified during iteration
Line 349  public: Line 349  public:
         inline size_t index() {          inline size_t index() {
                 return findex;                  return findex;
         }          }
   
         inline char* key() {  
                 return pa_uitoa(findex);  
         }  
 };  };
   
 // Robust as used for arrays that can be modified during iteration  // Robust as used for arrays that can be modified during iteration
Line 375  public: Line 371  public:
         inline size_t index() {          inline size_t index() {
                 return findex;                  return findex;
         }          }
   
         inline char *key() {  
                 return pa_uitoa(index());  
         }  
 };  };
 #endif  #endif

Removed from v.1.102  
changed lines
  Added in v.1.105


E-mail: