Skip to main content

value_identity_pointer

Function value_identity_pointer 

Source
pub fn value_identity_pointer(state: &LuaState, o: &LuaValue) -> Option<usize>
Expand description

The object-identity token for a LuaValue, mirroring lua_topointer. Reference types (string, table, function, userdata, thread, light userdata) yield Some; the value types (nil, boolean, numbers) yield None.

A light C function resolves to its registered bare fn’s real code address via the per-state c_functions table — never the tiny registry index. This is the single resolver behind api::to_pointer, display_default_bytes, and the public omnilua *::to_pointer handles, so every path prints the same address for the same value.