Skip to content

Commit 1860881

Browse files
author
Ryan Nevell
committed
Clean up test cases
1 parent 33c5961 commit 1860881

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Examples/test-suite/lua/lua_lightuserdata_runme.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require("import") -- the import fn
2-
require("lua_lightuserdata") -- import lib
2+
import("lua_lightuserdata") -- import lib
33

44
local t = lua_lightuserdata
55
local d = t.get_lightuserdata()

Examples/test-suite/lua_lightuserdata.i

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
%native(get_lightuserdata) int get_lightuserdata(lua_State* L);
44
%{
5+
static int foo;
56
int get_lightuserdata(lua_State* L)
67
{
7-
lua_pushlightuserdata(L, reinterpret_cast<void*>(0x123456));
8+
lua_pushlightuserdata(L, &foo);
89
return 1;
910
}
1011
%}
1112

1213
%inline %{
1314
bool check_lighuserdata(const void* d) {
14-
return reinterpret_cast<void*>(0x123456) == d;
15+
return d == &foo;
1516
}
1617
%}

0 commit comments

Comments
 (0)