IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 13, 2006, 4:26:25 PM (20 years ago)
Author:
drobbin
Message:

Added str check test for error handling of psString fxns, namely stringSubstitute. Edited memory and type to include MemCheck's for string, line, and region. Added is_psType function to check for NULLs and native types first. <-will have to update all fxns next wrt to this change. Added psStringAlloc, stringFree, regionFree. Added doxygen comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psRegion.c

    r7563 r7901  
    66#include "psRegion.h"
    77
     8static void regionFree(psRegion *region)
     9{
     10    // There are non dynamic allocated items
     11}
     12
    813psRegion *psRegionAlloc(float x0,
    914                        float x1,
     
    1217{
    1318    psRegion *region = psAlloc(sizeof(psRegion)); // New region, to be returned
     19    psMemSetDeallocator(region, (psFreeFunc)regionFree);
    1420    // No complex structures, so no special deallocator
    1521    *region = psRegionSet(x0, x1, y0, y1);
     
    101107}
    102108
     109bool psMemCheckRegion(psPtr ptr)
     110{
     111    if (!is_psType(ptr)) {
     112        return false;
     113    }
     114    return ( psMemGetDeallocator(ptr) == (psFreeFunc)regionFree );
     115}
     116
     117
Note: See TracChangeset for help on using the changeset viewer.