Skip to content

Commit 47a7b4d

Browse files
committed
Fixed #7832 (Double dbPoll freeze)
Fixed some compiler warnings. Improved crash dump output.
1 parent 64588f1 commit 47a7b4d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/luaconf.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,10 @@
376376
*/
377377
#if defined(LUA_USE_APICHECK)
378378
/////////////////////////////////////////////////////////////////////////
379-
// MTA addition for testing if apicheck (and assert) will function as expected
380-
#ifndef NDEBUG
381-
#include <assert.h>
382-
LUA_API int luaX_is_apicheck_enabled();
383-
#endif
379+
// MTA addition for testing if apicheck will function as expected, and generating more useful crash dumps
380+
#undef assert
381+
#define assert(_Expression) (void)( (!!(_Expression)) || ( *((int*)NULL) = 0) )
382+
LUA_API int luaX_is_apicheck_enabled();
384383
/////////////////////////////////////////////////////////////////////////
385384
#define luai_apicheck(L,o) { (void)L; assert(o); }
386385
#else

0 commit comments

Comments
 (0)