diff options
| -rw-r--r-- | ltests.h | 11 |
1 files changed, 10 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.h,v 2.46 2014/12/19 13:33:06 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.47 2014/12/26 14:44:44 roberto Exp roberto $ |
| 3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -37,6 +37,15 @@ | |||
| 37 | #define UNUSED(x) (x=0, (void)(x)) | 37 | #define UNUSED(x) (x=0, (void)(x)) |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | /* test for sizes in 'l_sprintf' (make sure whole buffer is available) */ | ||
| 41 | #undef l_sprintf | ||
| 42 | #if !defined(LUA_USE_C89) | ||
| 43 | #define l_sprintf(s,sz,f,i) (memset(s,0xAB,sz), snprintf(s,sz,f,i)) | ||
| 44 | #else | ||
| 45 | #define l_sprintf(s,sz,f,i) (memset(s,0xAB,sz), sprintf(s,f,i)) | ||
| 46 | #endif | ||
| 47 | |||
| 48 | |||
| 40 | /* memory-allocator control variables */ | 49 | /* memory-allocator control variables */ |
| 41 | typedef struct Memcontrol { | 50 | typedef struct Memcontrol { |
| 42 | unsigned long numblocks; | 51 | unsigned long numblocks; |
