Ignore:
Timestamp:
Aug 2, 2001, 10:36:35 PM (24 years ago)
Author:
umoeller
Message:

Misc changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/xstring.h

    r74 r91  
    5050        ULONG           ulDelta;        // allocation delta (0 = none)
    5151                                        // V0.9.9 (2001-03-07) [umoeller]
     52
     53        // if memory debugging is enabled, enable the following
     54        // extra fields globally... even if the caller doesn't
     55        // want the replacement calls, the xstr* implementations
     56        // are compiled with these fields, so they must always be
     57        // present V0.9.14 (2001-08-01) [umoeller]
     58        #if defined(__XWPMEMDEBUG__) // setup.h only
     59            const char      *file;
     60            unsigned long   line;
     61            const char      *function;
     62        #endif
     63
    5264    } XSTRING, *PXSTRING;
    5365
    54     void XWPENTRY xstrInit(PXSTRING pxstr, ULONG ulPreAllocate);
     66    #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_XSTR_MALLOC) // setup.h, helpers\memdebug.c
     67        #define xstrInit(a, b) xstrInitDebug((a), (b), __FILE__, __LINE__, __FUNCTION__)
     68        void XWPENTRY xstrInitDebug(PXSTRING pxstr,
     69                                    ULONG ulPreAllocate,
     70                                    const char *file,
     71                                    unsigned long line,
     72                                    const char *function);
     73        typedef void XWPENTRY XSTRINITDEBUG(PXSTRING pxstr,
     74                                            ULONG ulPreAllocate,
     75                                            const char *file,
     76                                            unsigned long line,
     77                                            const char *function);
     78        typedef XSTRINITDEBUG *PXSTRINITDEBUG;
     79    #else
     80        void XWPENTRY xstrInit(PXSTRING pxstr, ULONG ulPreAllocate);
     81        typedef void XWPENTRY XSTRINIT(PXSTRING pxstr, ULONG ulPreAllocate);
     82        typedef XSTRINIT *PXSTRINIT;
     83    #endif
     84
     85    /* void XWPENTRY xstrInit(PXSTRING pxstr, ULONG ulPreAllocate);
    5586    typedef void XWPENTRY XSTRINIT(PXSTRING pxstr, ULONG ulPreAllocate);
    56     typedef XSTRINIT *PXSTRINIT;
     87    typedef XSTRINIT *PXSTRINIT; */
    5788
    5889    void XWPENTRY xstrInitSet(PXSTRING pxstr, PSZ pszNew);
Note: See TracChangeset for help on using the changeset viewer.