# HG changeset patch
# User Akos Ladanyi <ladanyi@tmit.bme.hu>
# Date 1208110545 -7200
# Node ID fdf71f738b6de5710b44324b503148f75fd93b62
# Parent 73bf871c5bdee83fcada58af29d0f76bfc1dc8cc
Improved LEMON_FUNCTION_NAME macro.
It should work fine with GCC and the MS C++ compilers. Otherwise it reverts to
using the __func__ variable which is C99, but I couldn't find a better
alternative.
diff --git a/lemon/assert.h b/lemon/assert.h
a
|
b
|
|
103 | 103 | #endif |
104 | 104 | |
105 | 105 | #ifndef LEMON_FUNCTION_NAME |
106 | | # define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__) |
| 106 | # if defined __GNUC__ |
| 107 | # define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__) |
| 108 | # elif defined _MSC_VER |
| 109 | # define LEMON_FUNCTION_NAME (__FUNCSIG__) |
| 110 | # else |
| 111 | # define LEMON_FUNCTION_NAME (__func__) |
| 112 | # endif |
107 | 113 | #endif |
108 | 114 | |
109 | 115 | #ifdef DOXYGEN |