mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
fix linux-side compile errors
This commit is contained in:
parent
880f8f123a
commit
b77d529099
3 changed files with 13 additions and 9 deletions
|
@ -400,7 +400,7 @@ board_reset( BoardCtxt* board )
|
|||
} /* board_reset */
|
||||
|
||||
#ifdef COMMON_LAYOUT
|
||||
# ifdef DEBUG
|
||||
# if 0
|
||||
static void
|
||||
printDims( const BoardDims* dimsp )
|
||||
{
|
||||
|
@ -543,7 +543,7 @@ board_figureLayout( BoardCtxt* board, const CurGameInfo* gi,
|
|||
break;
|
||||
}
|
||||
|
||||
// printDims( &ldims );
|
||||
printDims( &ldims );
|
||||
|
||||
if ( !!dimsp ) {
|
||||
XP_MEMCPY( dimsp, &ldims, sizeof(ldims) );
|
||||
|
|
|
@ -49,8 +49,10 @@ p_dict_ref( DictionaryCtxt* dict
|
|||
if ( !!dict ) {
|
||||
pthread_mutex_lock( &dict->mutex );
|
||||
++dict->refCount;
|
||||
/* XP_LOGF( "%s(dict=%p): refCount now %d (from line %d of %s() in %s)", */
|
||||
/* __func__, dict, dict->refCount, line, func, file ); */
|
||||
#ifdef DEBUG_REF
|
||||
XP_LOGF( "%s(dict=%p): refCount now %d (from line %d of %s() in %s)",
|
||||
__func__, dict, dict->refCount, line, func, file );
|
||||
#endif
|
||||
pthread_mutex_unlock( &dict->mutex );
|
||||
}
|
||||
return dict;
|
||||
|
@ -67,8 +69,10 @@ p_dict_unref( DictionaryCtxt* dict
|
|||
pthread_mutex_lock( &dict->mutex );
|
||||
--dict->refCount;
|
||||
XP_ASSERT( 0 <= dict->refCount );
|
||||
/* XP_LOGF( "%s(dict=%p): refCount now %d (from line %d of %s() in %s)", */
|
||||
/* __func__, dict, dict->refCount, line, func, file ); */
|
||||
#ifdef DEBUG_REF
|
||||
XP_LOGF( "%s(dict=%p): refCount now %d (from line %d of %s() in %s)",
|
||||
__func__, dict, dict->refCount, line, func, file );
|
||||
#endif
|
||||
pthread_mutex_unlock( &dict->mutex );
|
||||
if ( 0 == dict->refCount ) {
|
||||
(*dict->destructor)( dict );
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#ifndef __DICTNRY_H__
|
||||
#define __DICTNRY_H__
|
||||
|
||||
#ifdef DEBUG
|
||||
# define DEBUG_REF 1
|
||||
#endif
|
||||
/* #ifdef DEBUG */
|
||||
/* # define DEBUG_REF 1 */
|
||||
/* #endif */
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue