IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 6, 2005, 4:17:54 PM (21 years ago)
Author:
drobbin
Message:

made revisions according to psLib SDRS rev 15

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psVector.c

    r4409 r4493  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-06-28 20:17:52 $
     11*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-07-07 02:17:53 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4848// FUNCTION IMPLEMENTATION - PUBLIC
    4949
    50 psVector* psVectorAlloc(unsigned long nalloc, psElemType type)
     50psVector* psVectorAlloc( long nalloc, psElemType type)
    5151{
    5252    psVector* psVec = NULL;
     
    6767    psVec->type.dimen = PS_DIMEN_VECTOR;
    6868    psVec->type.type = type;
    69     *(int*)&psVec->nalloc = nalloc;
     69    *(long*)&psVec->nalloc = nalloc;
    7070    psVec->n = nalloc;
    7171
     
    7676}
    7777
    78 psVector* psVectorRealloc(psVector* vector, unsigned long nalloc)
     78psVector* psVectorRealloc(psVector* vector, long nalloc)
    7979{
    8080    psS32 elementSize = 0;
     
    9393        // Realloc after decrementation to avoid accessing freed array elements
    9494        vector->data.U8 = psRealloc(vector->data.U8, nalloc * elementSize);
    95         *(int*)&vector->nalloc = nalloc;
     95        *(long*)&vector->nalloc = nalloc;
    9696    }
    9797
     
    9999}
    100100
    101 psVector* psVectorRecycle(psVector* vector, unsigned long nalloc, psElemType type)
     101psVector* psVectorRecycle(psVector* vector, long nalloc, psElemType type)
    102102{
    103103    psS32 byteSize;
     
    120120    if (byteSize > vector->nalloc*PSELEMTYPE_SIZEOF(vector->type.type)) {
    121121        vector->data.U8 = psRealloc(vector->data.U8, byteSize);
    122         *(int*)&vector->nalloc = nalloc;
     122        *(long*)&vector->nalloc = nalloc;
    123123    }
    124124
Note: See TracChangeset for help on using the changeset viewer.