1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00

Fix compilation error when optram=0

This commit fixes
src/modules/tmr.c:203: warning: implicit declaration of function 'LNUMVAL'
src/modules/tmr.c:203: error: initializer element is not constant
src/modules/tmr.c:203: error: (near initialization for 'tmr_map[11].func')
due to missing #if LUA_OPTIMIZE_MEMORY > 0
This commit is contained in:
Martin Guy 2011-12-11 17:19:24 +01:00
parent bbd7c635b9
commit 2f560fb16b

View File

@ -200,8 +200,10 @@ const LUA_REG_TYPE tmr_map[] =
#endif
#if VTMR_NUM_TIMERS > 0
{ LSTRKEY( "__index" ), LFUNCVAL( tmr_mt_index ) },
{ LSTRKEY( "SYS_TIMER" ), LNUMVAL( PLATFORM_TIMER_SYS_ID ) },
#endif
#if LUA_OPTIMIZE_MEMORY > 0
{ LSTRKEY( "SYS_TIMER" ), LNUMVAL( PLATFORM_TIMER_SYS_ID ) },
#endif
#if LUA_OPTIMIZE_MEMORY > 0 && defined( BUILD_LUA_INT_HANDLERS )
{ LSTRKEY( "INT_ONESHOT" ), LNUMVAL( PLATFORM_TIMER_INT_ONESHOT ) },
{ LSTRKEY( "INT_CYCLIC" ), LNUMVAL( PLATFORM_TIMER_INT_CYCLIC ) },