Changeset 78b3f52 for src/libcfa/assert


Ignore:
Timestamp:
Dec 2, 2016, 5:10:22 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d7bcbf5
Parents:
4cb935e
Message:

Ugly but working coroutines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/assert

    r4cb935e r78b3f52  
    2020        #include <assert.h>
    2121
    22         #define __STRINGIFY__(str) #str
    23         #define __VSTRINGIFY__(str) __STRINGIFY__(str)
    24         #define assertf(expr, fmt, ...) ((expr) ? ((void)2) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
     22        #ifdef NDEBUG
     23                #define assertf(expr, fmt, ...) ((void)0)
     24        #else
     25                #define __STRINGIFY__(str) #str
     26                #define __VSTRINGIFY__(str) __STRINGIFY__(str)
     27                #define assertf(expr, fmt, ...) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
    2528
    26         void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn));
     29                void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn));
     30        #endif
    2731}
    2832
Note: See TracChangeset for help on using the changeset viewer.