IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 13, 2006, 11:13:48 AM (20 years ago)
Author:
Paul Price
Message:

Synchronising with SDRS, and cleaning up:

  • Replaced is_psType() with PS_ASSERT_PTR() throughout psLib.
  • Changed "char *" to "psString" where appropriate in psDB and a few other places (to indicate pointers on the PS memory system).
  • Removed psLogArguments and psTraceArguments (functionality in psArgumentVerbosity).
  • Renamed psMetadataLookupMD to psMetadataLookupMetadata (it was about time...). Similarly with the psPolynomial?D{From,To}MD functions.
  • Removed psMetadataRemove() since it is ambiguous about what's removed --- use psMetadataRemove{Key,Index}.
  • psArrayRemoveByPos --> psArrayRemoveIndex
  • psArrayRemove --> psArrayRemoveData
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psAssert.h

    r8921 r9538  
    66#include <math.h>
    77
     8#include "psMemory.h"
    89#include "psError.h"
    910#include "psLogMsg.h"
     11
     12// Ensure this is a psLib pointer, by checking for the memblock bounds.
     13#define PS_ASSERT_PTR(NAME, RVAL) \
     14{ \
     15    psMemBlock *mb = (psMemBlock*)(NAME) - 1; \
     16    if (mb->startblock != P_PS_MEMMAGIC || mb->endblock != P_PS_MEMMAGIC || \
     17            *(psPtr *)((int8_t *) (mb + 1) + mb->userMemorySize) != P_PS_MEMMAGIC) { \
     18        psError(PS_ERR_MEMORY_CORRUPTION, false, \
     19                "Error: Pointer %s is corrupted or not on the PS memory system.", \
     20                #NAME); \
     21        return (RVAL); \
     22    } \
     23}
    1024
    1125#define PS_ASSERT_INT_UNEQUAL(NAME1, NAME2, RVAL) \
Note: See TracChangeset for help on using the changeset viewer.