mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
add __FUNCTION__ to assert macro
This commit is contained in:
parent
e0edcb52a8
commit
5d043e349e
2 changed files with 5 additions and 5 deletions
|
@ -575,11 +575,11 @@ palm_warnf( char* format, ... )
|
|||
} /* palm_warnf */
|
||||
|
||||
void
|
||||
palm_assert( Boolean b, int line, char* fileName )
|
||||
palm_assert( Boolean b, int line, const char* func, const char* file )
|
||||
{
|
||||
if ( !b ) {
|
||||
XP_LOGF( "ASSERTION FAILED: line %d in %s", line, fileName );
|
||||
XP_WARNF( "ASSERTION FAILED: line %d in %s", line, fileName );
|
||||
XP_LOGF( "ASSERTION FAILED: line %d, %s(), %s", line, func, file );
|
||||
XP_WARNF( "ASSERTION FAILED: line %d, %s(), %s", line, func, file );
|
||||
}
|
||||
} /* palmassert */
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ typedef XP_U32 XP_Time;
|
|||
|
||||
void palm_debugf(char*, ...);
|
||||
void p_ignore(char*, ...);
|
||||
void palm_assert(Boolean b, int line, char* fileName );
|
||||
void palm_assert(Boolean b, int line, const char* func, const char* file );
|
||||
void palm_warnf( char* format, ... );
|
||||
void palm_logf( char* format, ... );
|
||||
XP_U16 palm_snprintf( XP_UCHAR* buf, XP_U16 len, XP_UCHAR* format, ... );
|
||||
|
@ -84,7 +84,7 @@ XP_U8* palm_realloc(XP_U8* in, XP_U16 size);
|
|||
#define XP_ABS(a) ((a)>=0?(a):-(a))
|
||||
|
||||
#ifdef DEBUG
|
||||
#define XP_ASSERT(b) palm_assert(b, __LINE__, __FILE__)
|
||||
#define XP_ASSERT(b) palm_assert(b, __LINE__, __FUNCTION__, __FILE__)
|
||||
#else
|
||||
#define XP_ASSERT(b)
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue