IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 566


Ignore:
Timestamp:
May 3, 2004, 3:09:20 PM (22 years ago)
Author:
rhl
Message:

Follow changes to psMem APIs

Location:
trunk/archive/pslib/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/src/Metadata/metadata.c

    r488 r566  
    2626{
    2727    if (ms == NULL) {
     28        return;
     29    } else if (psMemGetRefCounter(ms) > 1) {
     30        psMemDecrRefCounter(ms);
    2831        return;
    2932    }
     
    223226        psError(__func__, PS_ERR_UNKNOWN, PS_NEW_ERROR,
    224227                "Key \"%s\" is already present in the metaDataSet 0x%x", item->name, ms);
    225         //psMetadataItemFree(item);
     228        psMetadataItemFree(item);
    226229
    227230        return NULL;
     
    236239/************************************************************************************************************/
    237240/*
    238  * Convenience wrapper for psMetadataAppend()
     241 * Convenience wrapper for psMetadataAppendItem()
    239242 */
    240243psMetadataItem *psMetadataAppend(psMetadata *restrict md, ///< Metadata to add to
     
    258261}
    259262
    260 
    261263/*****************************************************************************/
    262264/*
  • trunk/archive/pslib/src/Utils/memory.c

    r446 r566  
    5454static psMemExhaustedCB memExhaustedCB = memExhaustedCB0;
    5555
    56 psMemExhaustedCB psMemExhaustedSetCB(psMemExhaustedCB func)
     56psMemExhaustedCB psMemExhaustedCBSet(psMemExhaustedCB func)
    5757{
    5858    psMemExhaustedCB old = memExhaustedCB;
     
    9191static psMemProblemCB memProblemCB = memProblemCB0;
    9292
    93 psMemProblemCB psMemProblemSetCB(psMemProblemCB func)
     93psMemProblemCB psMemProblemCBSet(psMemProblemCB func)
    9494{
    9595    psMemProblemCB old = memProblemCB;
     
    107107long p_psMemFreeID = 0;                 // notify user this block is freed
    108108
    109 long psMemSetAllocateID(long id)        // set p_psMemAllocateID to id
     109long psMemAllocateIDSet(long id)        // set p_psMemAllocateID to id
    110110{
    111111    long old = p_psMemAllocateID;
     
    115115}
    116116
    117 long psMemSetFreeID(long id)            // set p_psMemFreeID to id
     117long psMemFreeIDSet(long id)            // set p_psMemFreeID to id
    118118{
    119119    long old = p_psMemFreeID;
     
    153153static psMemFreeCB memFreeCB = memFreeCB0;
    154154
    155 psMemAllocateCB psMemAllocateSetCB(psMemAllocateCB func)
     155psMemAllocateCB psMemAllocateCBSet(psMemAllocateCB func)
    156156{
    157157    psMemAllocateCB old = memAllocateCB;
     
    162162}
    163163
    164 psMemFreeCB psMemFreeSetCB(psMemFreeCB func)
     164psMemFreeCB psMemFreeCBSet(psMemFreeCB func)
    165165{
    166166    psMemFreeCB old = memFreeCB;
  • trunk/archive/pslib/src/Utils/tst_memory.c

    r446 r566  
    99 * My callbacks
    1010 */
    11 static int my_MemAllocateCB(const psMemBlock *ptr)
     11static long my_MemAllocateCB(const psMemBlock *ptr)
    1212{
    1313    static int incr = 0;                // "p_psMemAllocateID += incr"
     
    5454     * Install my callbacks
    5555     */
    56     (void)psMemAllocateSetCB(my_MemAllocateCB);
    57     default_MemProblemCB = psMemProblemSetCB(my_MemProblemCB);
    58     (void)psMemExhaustedSetCB(my_MemExhaustedCB);
     56    (void)psMemAllocateCBSet(my_MemAllocateCB);
     57    default_MemProblemCB = psMemProblemCBSet(my_MemProblemCB);
     58    (void)psMemExhaustedCBSet(my_MemExhaustedCB);
    5959    /*
    6060     * Request callback on first allocation
    6161     */
    62     (void)psMemSetAllocateID(1);
     62    (void)psMemAllocateIDSet(1);
    6363    /*
    6464     * Start allocating
  • trunk/archive/pslib/src/Utils/tst_trace.c

    r390 r566  
    66#include "psLib.h"
    77
    8 static int my_MemAllocateCB(const psMemBlock *ptr)
     8static long my_MemAllocateCB(const psMemBlock *ptr)
    99{
    1010    static int n = 1;                   // "p_psMemAllocateID += n"
     
    2323    psSetLogFormat("NM");               // suppress some of the psLogMsg verbosity
    2424
    25     (void)psMemAllocateSetCB(my_MemAllocateCB);
    26     //(void)psMemFreeSetCB(my_MemAllocateCB);
    27     psMemSetAllocateID(1);
    28     psMemSetFreeID(14);
     25    (void)psMemAllocateCBSet(my_MemAllocateCB);
     26    //(void)psMemFreeCBSet(my_MemAllocateCB);
     27    psMemAllocateIDSet(1);
     28    psMemFreeIDSet(14);
    2929   
    3030#if 0
Note: See TracChangeset for help on using the changeset viewer.