summaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ltests.c b/ltests.c
index 99623541..4dee632c 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.128 2002/06/25 19:16:44 roberto Exp roberto $ 2** $Id: ltests.c,v 1.129 2002/07/09 14:58:28 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*/
@@ -413,7 +413,7 @@ static int newuserdata (lua_State *L) {
413 413
414 414
415static int pushuserdata (lua_State *L) { 415static int pushuserdata (lua_State *L) {
416 lua_pushudataval(L, cast(void *, luaL_check_int(L, 1))); 416 lua_pushlightuserdata(L, cast(void *, luaL_check_int(L, 1)));
417 return 1; 417 return 1;
418} 418}
419 419
@@ -579,7 +579,7 @@ static int testC (lua_State *L) {
579 lua_pushnumber(L, lua_isuserdata(L, getnum)); 579 lua_pushnumber(L, lua_isuserdata(L, getnum));
580 } 580 }
581 else if EQ("isudataval") { 581 else if EQ("isudataval") {
582 lua_pushnumber(L, lua_isudataval(L, getnum)); 582 lua_pushnumber(L, lua_islightuserdata(L, getnum));
583 } 583 }
584 else if EQ("isnil") { 584 else if EQ("isnil") {
585 lua_pushnumber(L, lua_isnil(L, getnum)); 585 lua_pushnumber(L, lua_isnil(L, getnum));
@@ -741,11 +741,12 @@ static void fim (void) {
741} 741}
742 742
743 743
744void luaB_opentests (lua_State *L) { 744int luaB_opentests (lua_State *L) {
745 *cast(int **, L) = &islocked; /* init lock */ 745 *cast(int **, L) = &islocked; /* init lock */
746 lua_state = L; /* keep first state to be opened */ 746 lua_state = L; /* keep first state to be opened */
747 luaL_opennamedlib(L, "T", tests_funcs, 0); 747 luaL_opennamedlib(L, "T", tests_funcs, 0);
748 atexit(fim); 748 atexit(fim);
749 return 0;
749} 750}
750 751
751#endif 752#endif