(file) Return to ptrarray.c CVS log (file) (dir) Up to [OMI] / omi / base

Diff for /omi/base/ptrarray.c between version 1.1 and 1.2

version 1.1, 2015/04/20 18:19:50 version 1.2, 2015/09/25 20:24:20
Line 1 
Line 1 
 #include "ptrarray.h" #include "ptrarray.h"
 #include <stdlib.h> #include <stdlib.h>
   #include <pal/intsafe.h>
  
 int PtrArray_Construct( int PtrArray_Construct(
     PtrArray* self,     PtrArray* self,
Line 13 
Line 14 
     self->capacity = capacity;     self->capacity = capacity;
     self->destructor = destructor;     self->destructor = destructor;
  
     self->data = (void**)PAL_Malloc(self->capacity * sizeof(void*));      size_t allocSize = 0;
       if (SizeTMult(self->capacity, sizeof(void*), &allocSize) == S_OK)
       {
           self->data = (void**)PAL_Malloc(allocSize);
       }
  
     if (!self->data)     if (!self->data)
         return -1;         return -1;


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

ViewCVS 0.9.2