summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2023-11-16 12:55:58 +0000
committerAlex Orlenko <zxteam@protonmail.com>2023-11-16 12:55:58 +0000
commit5043447f230d0be2a4dde9512cb1aae1501a91a9 (patch)
treed0611a3661f7da97eb9e78c2934cbaf17621077b /src/util
parentb879abc418475a375065c2156ef46c9c1aeaff80 (diff)
downloadmlua-5043447f230d0be2a4dde9512cb1aae1501a91a9.zip
Support Luau buffer type and and library.
Buffer is an object that represents a fixed-size mutable block of memory and added to Luau 0.601. See https://luau-lang.org/library#buffer-library for more details.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/mod.rs b/src/util/mod.rs
index 72d359c..6043c24 100644
--- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ -1043,6 +1043,8 @@ pub(crate) unsafe fn to_string(state: *mut ffi::lua_State, index: c_int) -> Stri
ffi::LUA_TFUNCTION => format!("<function {:?}>", ffi::lua_topointer(state, index)),
ffi::LUA_TUSERDATA => format!("<userdata {:?}>", ffi::lua_topointer(state, index)),
ffi::LUA_TTHREAD => format!("<thread {:?}>", ffi::lua_topointer(state, index)),
+ #[cfg(feature = "luau")]
+ ffi::LUA_TBUFFER => format!("<buffer {:?}>", ffi::lua_topointer(state, index)),
_ => "<unknown>".to_string(),
}
}