diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-06 14:01:29 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-06 14:01:29 -0200 |
commit | 1f917e709ca3fe41cf07fd4bf99a080883521394 (patch) | |
tree | 00e89f7218a38e028bebe111dbf682925fe4cca0 /ltests.h | |
parent | d444153dbea006f5e0547f27a11256af96ba1829 (diff) | |
download | lua-1f917e709ca3fe41cf07fd4bf99a080883521394.tar.gz lua-1f917e709ca3fe41cf07fd4bf99a080883521394.tar.bz2 lua-1f917e709ca3fe41cf07fd4bf99a080883521394.zip |
better use of extra include files (both for tests and for old_ansi)
Diffstat (limited to 'ltests.h')
-rw-r--r-- | ltests.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.h,v 1.1 2001/02/02 15:12:25 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 1.2 2001/02/05 19:08:01 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 | */ |
@@ -8,6 +8,8 @@ | |||
8 | #define ltests_h | 8 | #define ltests_h |
9 | 9 | ||
10 | 10 | ||
11 | #include <stdlib.h> | ||
12 | |||
11 | 13 | ||
12 | #define LUA_DEBUG | 14 | #define LUA_DEBUG |
13 | 15 | ||
@@ -27,6 +29,14 @@ extern unsigned long memdebug_maxmem; | |||
27 | extern unsigned long memdebug_memlimit; | 29 | extern unsigned long memdebug_memlimit; |
28 | 30 | ||
29 | 31 | ||
32 | #define l_malloc(s) debug_realloc(NULL, 0, s) | ||
33 | #define l_realloc(b, os, s) debug_realloc(b, os, s) | ||
34 | #define l_free(b, s) debug_realloc(b, s, 0) | ||
35 | |||
36 | void *debug_realloc (void *block, size_t oldsize, size_t size); | ||
37 | |||
38 | |||
39 | |||
30 | /* test for lock/unlock */ | 40 | /* test for lock/unlock */ |
31 | #define LUA_USERSTATE int *lock; | 41 | #define LUA_USERSTATE int *lock; |
32 | extern int islocked; | 42 | extern int islocked; |