Changeset 600 for branches/1.3/utils.h


Ignore:
Timestamp:
2009-07-05T07:36:11+02:00 (6 years ago)
Author:
moo
Message:

merged r347,r348,r349,r350,r351,r352,r355 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

    • Property svn:ignore
      •  

        old new  
        3232run-tests.php
        3333structinfo.m4
         34autom4te.cache
        3435tags
        3536
    • Property svn:mergeinfo changed
      /trunkmerged: 347-352,​355
  • branches/1.3/utils.h

    r593 r600  
    44#ifdef DEBUG
    55#   define IFDEBUG(x) (x)
    6 #   define TRACE(fmt, ...) \
    7     xc_trace("%s:%d: " fmt "\r\n", __FILE__, __LINE__, __VA_ARGS__)
     6int xc_vtrace(const char *fmt, va_list args);
    87int xc_trace(const char *fmt, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
     8
     9#   ifdef ZEND_WIN32
     10static inline int TRACE(const char *fmt, ...)
     11{
     12    va_list args;
     13    int ret;
     14
     15    va_start(args, fmt);
     16    ret = xc_vtrace(fmt, args);
     17    va_end(args);
     18    return ret;
     19}
     20#   else
     21#       define TRACE(fmt, ...) \
     22        xc_trace("%s:%d: " fmt "\r\n", __FILE__, __LINE__, __VA_ARGS__)
     23#   endif /* ZEND_WIN32 */
    924#   undef NDEBUG
    1025#   undef inline
    1126#   define inline
    12 #else
    13 #   define TRACE(fmt, ...) do { } while (0)
     27#else /* DEBUG */
     28
     29#   ifdef ZEND_WIN32
     30static inline int TRACE_DUMMY(const char *fmt, ...)
     31{
     32    return 0;
     33}
     34#       define TRACE 1 ? 0 : TRACE_DUMMY
     35#   else
     36#       define TRACE(fmt, ...) do { } while (0)
     37#   endif /* ZEND_WIN32 */
     38
    1439#   define IFDEBUG(x) do { } while (0)
    1540#   ifndef NDEBUG
    1641#       define NDEBUG
    1742#   endif
    18 #endif
     43#endif /* DEBUG */
    1944#include <assert.h>
    2045
Note: See TracChangeset for help on using the changeset viewer.