IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2004, 1:46:48 PM (22 years ago)
Author:
desonia
Message:

Added p_psCustomFree to handle the use of PS_FREE for a free fcn given to things like psDlistFree.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psMemory.c

    r850 r876  
    88 *  @author Robert Lupton, Princeton University
    99 *
    10  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-06-04 02:17:32 $
     10 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-06-04 23:46:48 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    507507}
    508508
     509void p_psCustomFree(psFreeFcn fcn, void* ptr)
     510{
     511
     512    if (fcn == NULL) {
     513        return;
     514    } else {
     515        if (fcn == PS_FREE) {
     516            psFree(ptr);
     517        } else {
     518            fcn(ptr);
     519        }
     520    }
     521}
Note: See TracChangeset for help on using the changeset viewer.