mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
add assert and a debugging aid
This commit is contained in:
parent
5c40f175bb
commit
fad2c7b3c1
3 changed files with 14 additions and 4 deletions
|
@ -929,7 +929,7 @@ Java_org_eehouse_android_xw4_jni_XwJNI_nli_1from_1stream
|
|||
jnli = makeObjectEmptyConst( env, PKG_PATH("NetLaunchInfo") );
|
||||
setNLI( env, jnli, &nli );
|
||||
} else {
|
||||
XP_LOGFF( "game_makeFromStream failed" );
|
||||
XP_LOGFF( "nli_makeFromStream failed" );
|
||||
}
|
||||
|
||||
stream_destroy( stream, env );
|
||||
|
@ -1303,8 +1303,17 @@ struct _JNIState {
|
|||
};
|
||||
|
||||
#define GAME_GUARD 0x453627
|
||||
#if 0
|
||||
# define LOG_FUNC_IF() LOG_FUNC()
|
||||
# define LOG_RETURN_VOID_IF() LOG_RETURN_VOID()
|
||||
#else
|
||||
# define LOG_FUNC_IF()
|
||||
# define LOG_RETURN_VOID_IF()
|
||||
#endif
|
||||
|
||||
#define XWJNI_START() { \
|
||||
JNIState* state = getState( env, gamePtr, __func__ ); \
|
||||
LOG_FUNC_IF(); \
|
||||
XP_ASSERT( state->guard == GAME_GUARD ); \
|
||||
MPSLOT; \
|
||||
MPASSIGN( mpool, state->mpool ); \
|
||||
|
@ -1317,6 +1326,7 @@ struct _JNIState {
|
|||
XP_USE(globals); /*no warnings */ \
|
||||
|
||||
#define XWJNI_END() \
|
||||
LOG_RETURN_VOID_IF(); \
|
||||
} \
|
||||
|
||||
JNIEXPORT jlong JNICALL
|
||||
|
|
|
@ -938,7 +938,6 @@ comms_stop( CommsCtxt* comms
|
|||
#endif
|
||||
)
|
||||
{
|
||||
LOG_FUNC();
|
||||
if ( addr_hasType( &comms->selfAddr, COMMS_CONN_RELAY ) ) {
|
||||
relayDisconnect( comms, xwe );
|
||||
}
|
||||
|
|
|
@ -163,6 +163,7 @@ stack_loadFromStream( StackCtxt* stack, XWStreamCtxt* stream )
|
|||
if ( STREAM_VERS_NINETILES <= stream_getVersion(stream) ) {
|
||||
stackVersion = stream_getU8( stream );
|
||||
XP_LOGFF( "read stackVersion: %d from stream", stackVersion );
|
||||
XP_ASSERT( stackVersion <= CUR_STREAM_VERS );
|
||||
}
|
||||
stack->highWaterMark = stream_getU16( stream );
|
||||
stack->nEntries = stream_getU16( stream );
|
||||
|
|
Loading…
Add table
Reference in a new issue