Change Lua ref types Debug print from Ref{index} to Ref{pointer}

The index is always uniq per instance, but pointer can exactly tell when
several values reference to the same Lua internal value.
This commit is contained in:
Alex Orlenko
2023-07-08 12:52:14 +01:00
parent 925a2816cc
commit 541139b944
4 changed files with 23 additions and 28 deletions
+1 -2
View File
@@ -139,8 +139,7 @@ impl<'lua> String<'lua> {
/// Typically this function is used only for hashing and debug information.
#[inline]
pub fn to_pointer(&self) -> *const c_void {
let ref_thread = self.0.lua.ref_thread();
unsafe { ffi::lua_topointer(ref_thread, self.0.index) }
self.0.to_pointer()
}
/// Convert this handle to owned version.