MCPcopy Create free account
hub / github.com/TASEmulators/fceux / addressof

Function addressof

src/lua-engine.cpp:1962–1967  ·  view source on GitHub ↗

because print traditionally shows the address of tables, and the print function I provide instead shows the contents of tables, I also provide this function (otherwise there would be no way to see a table's address, AFAICT)

Source from the content-addressed store, hash-verified

1960// I also provide this function
1961// (otherwise there would be no way to see a table's address, AFAICT)
1962static int addressof(lua_State *L)
1963{
1964 const void* ptr = lua_topointer(L,-1);
1965 lua_pushinteger(L, (lua_Integer)ptr);
1966 return 1;
1967}
1968
1969struct registerPointerMap
1970{

Callers

nothing calls this directly

Calls 2

lua_topointerFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected