summaryrefslogtreecommitdiff
path: root/src/string.rs
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2023-07-08 12:52:14 +0100
committerAlex Orlenko <zxteam@protonmail.com>2023-07-08 12:52:14 +0100
commit541139b944fbddfd79e3d517aed79de3b716e4d7 (patch)
tree1076dd5e4bf0fe968e481802fd72b869622c9837 /src/string.rs
parent925a2816cc8d25aececb51534adcbbe0de1e23b3 (diff)
downloadmlua-541139b944fbddfd79e3d517aed79de3b716e4d7.zip
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.
Diffstat (limited to 'src/string.rs')
-rw-r--r--src/string.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/string.rs b/src/string.rs
index 9a75cf5..d35f618 100644
--- a/src/string.rs
+++ b/src/string.rs
@@ -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.