IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 5, 2010, 9:50:55 AM (16 years ago)
Author:
eugene
Message:

added a psStringRealloc function; replaced the call to psRealloc in psSlurp with psStringRealloc (so free function is correctly set)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101103/psLib/src/sys/psString.h

    r15523 r29680  
    4040#define PS_FILE_LINE p_psFileLine(__FILE__,__LINE__)
    4141
    42 
    4342/** Allocates a new psString.
    4443 *
     
    6059#endif // ifdef DOXYGEN
    6160
     61/** Reallocate an existing psString (or alloc if not existent)
     62 *
     63 *  @return psString:       string of length n.
     64 */
     65#ifdef DOXYGEN
     66psString psStringRealloc(
     67    psString string,
     68    size_t nChar                        ///< Size of psString to allocate.
     69);
     70#else // ifdef DOXYGEN
     71psString p_psStringRealloc(
     72    const char *file,                   ///< File of caller
     73    unsigned int lineno,                ///< Line number of caller
     74    const char *func,                   ///< Function name of caller
     75    psString string,                    ///< supplied string or NULL
     76    size_t nChar                        ///< Size of psString to allocate.
     77) PS_ATTR_MALLOC;
     78#define psStringRealloc(string, nChar)                          \
     79    p_psStringRealloc(__FILE__, __LINE__, __func__, string, nChar)
     80#endif // ifdef DOXYGEN
    6281
    6382/** Checks the type of a particular pointer.
Note: See TracChangeset for help on using the changeset viewer.