mirror of https://github.com/swig/swig
Clean up test cases
This commit is contained in:
parent
33c59614fc
commit
18608816db
|
@ -1,5 +1,5 @@
|
|||
require("import") -- the import fn
|
||||
require("lua_lightuserdata") -- import lib
|
||||
import("lua_lightuserdata") -- import lib
|
||||
|
||||
local t = lua_lightuserdata
|
||||
local d = t.get_lightuserdata()
|
||||
|
|
|
@ -2,15 +2,16 @@
|
|||
|
||||
%native(get_lightuserdata) int get_lightuserdata(lua_State* L);
|
||||
%{
|
||||
static int foo;
|
||||
int get_lightuserdata(lua_State* L)
|
||||
{
|
||||
lua_pushlightuserdata(L, reinterpret_cast<void*>(0x123456));
|
||||
lua_pushlightuserdata(L, &foo);
|
||||
return 1;
|
||||
}
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
bool check_lighuserdata(const void* d) {
|
||||
return reinterpret_cast<void*>(0x123456) == d;
|
||||
return d == &foo;
|
||||
}
|
||||
%}
|
||||
|
|
Loading…
Reference in New Issue