diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-07-17 13:25:13 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-07-17 13:25:13 -0300 |
| commit | 79c8edb6c423b48270c1f61df6fd5a889ca5da0e (patch) | |
| tree | 1b79c096472f5f799f5576561e831b0d992c8cd0 /ltests.c | |
| parent | e5146fb01f1ccb40c2663e745feffbf642cbf862 (diff) | |
| download | lua-79c8edb6c423b48270c1f61df6fd5a889ca5da0e.tar.gz lua-79c8edb6c423b48270c1f61df6fd5a889ca5da0e.tar.bz2 lua-79c8edb6c423b48270c1f61df6fd5a889ca5da0e.zip | |
new names for light userdata operations
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -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 | ||
| 415 | static int pushuserdata (lua_State *L) { | 415 | static 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 | ||
| 744 | void luaB_opentests (lua_State *L) { | 744 | int 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 |
