Skip to main content

luaur_vm/records/
luau_object.rs

1#[allow(non_camel_case_types)]
2#[repr(C)]
3#[derive(Debug, Copy, Clone)]
4pub struct LuauObject {
5    pub(crate) tt: u8,
6    pub(crate) marked: u8,
7    pub(crate) memcat: u8,
8
9    pub gclist: *mut crate::records::gc_object::GcObject,
10
11    /// The class object that this value is an instance of.
12    pub lclass: *mut crate::records::luau_class::LuauClass,
13
14    /// The number of members that this instance contains. We need this in order
15    /// to free ourselves if we got swept in the same GC cycle as our class
16    /// pointer.
17    pub numberofmembers: core::ffi::c_int,
18
19    /// The fields of this instance.
20    pub members: *mut crate::records::lua_t_value::TValue,
21}
22
23impl LuauObject {
24    pub const CommonHeader: () = ();
25}