IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 14, 2006, 4:57:12 PM (20 years ago)
Author:
drobbin
Message:

Added error handling to memory checking functions. Will hopefully avoid segfaults and abort calls now when passed in native types.

Location:
trunk/psLib/src/mathtypes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psImage.c

    r7766 r7914  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.111 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-06-30 02:20:06 $
     11 *  @version $Revision: 1.112 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-07-15 02:57:12 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    110110bool psMemCheckImage(psPtr ptr)
    111111{
     112    if (!is_psType(ptr)) {
     113        return false;
     114    }
    112115    return ( psMemGetDeallocator(ptr) == (psFreeFunc)imageFree );
    113116}
  • trunk/psLib/src/mathtypes/psScalar.c

    r6331 r7914  
    88 *  @author Ross Harman, MHPCC
    99 *
    10  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-02-06 22:20:05 $
     10 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-07-15 02:57:12 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8989bool psMemCheckScalar(psPtr ptr)
    9090{
     91    if (!is_psType(ptr)) {
     92        return false;
     93    }
    9194    return ( psMemGetDeallocator(ptr) == (psFreeFunc)scalarFree );
    9295}
  • trunk/psLib/src/mathtypes/psVector.c

    r7872 r7914  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.77 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2006-07-12 03:50:48 $
     11*  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2006-07-15 02:57:12 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6363bool psMemCheckVector(psPtr ptr)
    6464{
     65    if (!is_psType(ptr)) {
     66        return false;
     67    }
    6568    return ( psMemGetDeallocator(ptr) == (psFreeFunc)vectorFree );
    6669}
Note: See TracChangeset for help on using the changeset viewer.