aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-11-12 14:28:45 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-11-12 14:28:45 -0200
commit658e7caf92072fbcb1aac8737e05cb1ea4a90806 (patch)
tree6ff8156ebb68d3f70680b872371962bd8de202a3 /ltests.c
parent788506dd586e7da8f8593245286a4e4562c191f1 (diff)
downloadlua-658e7caf92072fbcb1aac8737e05cb1ea4a90806.tar.gz
lua-658e7caf92072fbcb1aac8737e05cb1ea4a90806.tar.bz2
lua-658e7caf92072fbcb1aac8737e05cb1ea4a90806.zip
use prefix in extern names, even those in test files
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ltests.c b/ltests.c
index c642ff1a..2720516c 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.42 2007/04/17 13:19:53 roberto Exp roberto $ 2** $Id: ltests.c,v 2.43 2007/06/21 13:48:04 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -37,7 +37,7 @@
37#if defined(LUA_DEBUG) 37#if defined(LUA_DEBUG)
38 38
39 39
40int Trick = 0; 40int l_Trick = 0;
41 41
42 42
43static lua_State *lua_state = NULL; 43static lua_State *lua_state = NULL;
@@ -88,7 +88,7 @@ static void pushobject (lua_State *L, const TValue *o) {
88#endif 88#endif
89 89
90 90
91Memcontrol memcontrol = {0L, 0L, 0L, 0L}; 91Memcontrol l_memcontrol = {0L, 0L, 0L, 0L};
92 92
93 93
94static void *checkblock (void *block, size_t size) { 94static void *checkblock (void *block, size_t size) {
@@ -493,20 +493,20 @@ static int get_limits (lua_State *L) {
493 493
494static int mem_query (lua_State *L) { 494static int mem_query (lua_State *L) {
495 if (lua_isnone(L, 1)) { 495 if (lua_isnone(L, 1)) {
496 lua_pushinteger(L, memcontrol.total); 496 lua_pushinteger(L, l_memcontrol.total);
497 lua_pushinteger(L, memcontrol.numblocks); 497 lua_pushinteger(L, l_memcontrol.numblocks);
498 lua_pushinteger(L, memcontrol.maxmem); 498 lua_pushinteger(L, l_memcontrol.maxmem);
499 return 3; 499 return 3;
500 } 500 }
501 else { 501 else {
502 memcontrol.memlimit = luaL_checkint(L, 1); 502 l_memcontrol.memlimit = luaL_checkint(L, 1);
503 return 0; 503 return 0;
504 } 504 }
505} 505}
506 506
507 507
508static int settrick (lua_State *L) { 508static int settrick (lua_State *L) {
509 Trick = lua_tointeger(L, 1); 509 l_Trick = lua_tointeger(L, 1);
510 return 0; 510 return 0;
511} 511}
512 512
@@ -1120,8 +1120,8 @@ static const struct luaL_Reg tests_funcs[] = {
1120 1120
1121 1121
1122static void checkfinalmem (void) { 1122static void checkfinalmem (void) {
1123 lua_assert(memcontrol.numblocks == 0); 1123 lua_assert(l_memcontrol.numblocks == 0);
1124 lua_assert(memcontrol.total == 0); 1124 lua_assert(l_memcontrol.total == 0);
1125} 1125}
1126 1126
1127 1127
@@ -1129,7 +1129,7 @@ int luaB_opentests (lua_State *L) {
1129 void *ud; 1129 void *ud;
1130 atexit(checkfinalmem); 1130 atexit(checkfinalmem);
1131 lua_assert(lua_getallocf(L, &ud) == debug_realloc); 1131 lua_assert(lua_getallocf(L, &ud) == debug_realloc);
1132 lua_assert(ud == cast(void *, &memcontrol)); 1132 lua_assert(ud == cast(void *, &l_memcontrol));
1133 lua_setallocf(L, lua_getallocf(L, NULL), ud); 1133 lua_setallocf(L, lua_getallocf(L, NULL), ud);
1134 lua_state = L; /* keep first state to be opened */ 1134 lua_state = L; /* keep first state to be opened */
1135 luaL_register(L, "T", tests_funcs); 1135 luaL_register(L, "T", tests_funcs);