aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index f0fe854a..1e27c45f 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.151 2003/01/29 10:27:53 roberto Exp roberto $ 2** $Id: ltests.c,v 1.152 2003/02/10 17:31:13 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*/
@@ -512,6 +512,13 @@ static int log2_aux (lua_State *L) {
512 return 1; 512 return 1;
513} 513}
514 514
515static int int2fb_aux (lua_State *L) {
516 int b = luaO_int2fb(luaL_checkint(L, 1));
517 lua_pushnumber(L, b);
518 lua_pushnumber(L, fb2int(b));
519 return 2;
520}
521
515 522
516static int test_do (lua_State *L) { 523static int test_do (lua_State *L) {
517 const char *p = luaL_checkstring(L, 1); 524 const char *p = luaL_checkstring(L, 1);
@@ -790,6 +797,7 @@ static const struct luaL_reg tests_funcs[] = {
790 {"closestate", closestate}, 797 {"closestate", closestate},
791 {"doremote", doremote}, 798 {"doremote", doremote},
792 {"log2", log2_aux}, 799 {"log2", log2_aux},
800 {"int2fb", int2fb_aux},
793 {"totalmem", mem_query}, 801 {"totalmem", mem_query},
794 {"resume", coresume}, 802 {"resume", coresume},
795 {"setyhook", setyhook}, 803 {"setyhook", setyhook},