Changeset 305 in svn for trunk/utils.h


Ignore:
Timestamp:
2006-12-08T17:11:19+01:00 (9 years ago)
Author:
Xuefer
Message:

TRACE() instead of ifdef/fprintf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.h

    r268 r305  
    11#include "php.h"
     2#include "xcache.h"
     3
     4#ifdef DEBUG
     5#   define IFDEBUG(x) (x)
     6#   define TRACE(fmt, ...) \
     7    xc_trace("%s:%d: " fmt "\r\n", __FILE__, __LINE__, __VA_ARGS__)
     8int xc_trace(const char *fmt, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
     9#   undef NDEBUG
     10#   undef inline
     11#   define inline
     12#else
     13#   define TRACE(fmt, ...) do { } while (0)
     14#   define IFDEBUG(x) do { } while (0)
     15#   ifndef NDEBUG
     16#       define NDEBUG
     17#   endif
     18#endif
     19#include <assert.h>
    220
    321typedef struct {
Note: See TracChangeset for help on using the changeset viewer.