Remove std::fmt::Debug from LuaDebug as it crashes a lot, make i_ci pub
This commit is contained in:
parent
d1413ea013
commit
8c554cfad9
|
@ -92,24 +92,5 @@ pub struct LuaDebug {
|
||||||
pub linedefined: i32,
|
pub linedefined: i32,
|
||||||
pub lastlinedefined: i32,
|
pub lastlinedefined: i32,
|
||||||
pub short_src: [std::os::raw::c_char; LUA_IDSIZE],
|
pub short_src: [std::os::raw::c_char; LUA_IDSIZE],
|
||||||
i_ci: i32
|
pub i_ci: i32
|
||||||
}
|
|
||||||
impl std::fmt::Debug for LuaDebug {
|
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
||||||
unsafe {
|
|
||||||
f.debug_struct("LuaDebug")
|
|
||||||
.field("event", &self.event)
|
|
||||||
.field("name", &std::ffi::CStr::from_ptr(self.name))
|
|
||||||
.field("namewhat", &std::ffi::CStr::from_ptr(self.namewhat))
|
|
||||||
.field("what", &std::ffi::CStr::from_ptr(self.what))
|
|
||||||
.field("source", &std::ffi::CStr::from_ptr(self.source))
|
|
||||||
.field("currentline", &self.currentline)
|
|
||||||
.field("nups", &self.nups)
|
|
||||||
.field("linedefined", &self.linedefined)
|
|
||||||
.field("lastlinedefined", &self.lastlinedefined)
|
|
||||||
.field("short_src", &std::ffi::CStr::from_ptr(self.short_src.as_ptr()))
|
|
||||||
.field("i_ci", &self.i_ci)
|
|
||||||
.finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue