aboutsummaryrefslogtreecommitdiff
path: root/ltests.h
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.h')
-rw-r--r--ltests.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/ltests.h b/ltests.h
index 18ae9a01..d3404aa4 100644
--- a/ltests.h
+++ b/ltests.h
@@ -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 */
41typedef struct Memcontrol { 50typedef struct Memcontrol {
42 unsigned long numblocks; 51 unsigned long numblocks;